自己今天看网易云音乐的时候,看着里面的1px实在是好看,没办法,强迫症,然后自己把vuejs项目中的1px优化了。话不多说,上代码。
css名写在最外div即可
.borderBottom1px {
width: 100%;
height: 100%;
position: relative;
}
.borderBottom1px:after {
content: '';
display: block;
position: absolute;
width: 100%;
left: 0;
bottom: 0;
height: 1px;
background-color: #c8c7cc;
transform: scaleY(0.5);
}
.borderRight1px{
width: 100%;
height: 100%;
position: relative;
}
.borderRight1px:after{
content: '';
display: block;
position: absolute;
width: 1px;
right: 0;
bottom: 68px;
height: 100%;
background-color: #c8c7cc;
transform: scaleX(0.5);
}