单边像素边
.scale-1px {
position: relative;
border: none;
}
.scale-1px:after {
content: "";
position: absolute;
bottom: 0; /*这边的top、bottom、left、right是用来定义那个边的*/
background: #000;
width: 100%;
height: 1px;
transform: scaleY(0.5);
transform-origin: 0 0;
}
4边的像素边
.scale-1px {
position: relative;
border: none;
}
.scale-1px:after {
content: "";
position: absolute;
border: 1px solid #000;
top: -50%;
right: -50%;
left: -50%;
bottom: -50%;
transform:scale(0.5);
}