使用affter伪类实现1px 边框

设置根元素的字体为62.5%,1rem 等于10px;

html{

font-size:62.5%

}

Bottom1px {

width: 100%;

height: 10rem;

position: relative;

}

.Bottom1px:after {

content: '';

display: block;

position: absolute;

width: 100%;

left: 0; bottom: 0;

height: 1px;

background-color: #c8c7cc;

transform: scaleY(0.5);

}

猜你喜欢

转载自blog.csdn.net/timebeign/article/details/79866853
今日推荐