I have found the method, but I don"t know how to use it. The code is as follows:
% border-1px {
display: block;
position:absolute;
left: 0;
width: 100%;
content: " ";
}
.border-1px {
position: relative;
&::after{
@extend %border-1px;
bottom: 0;
border-top: 1px solid -sharpccc;
}
&::before{
@extend %border-1px;
top: 0;
border-bottom: 1px solid -sharpccc;
}
}
@ media (- webkit-min-device-pixel-ratio:1.5), (min-device-pixel-ratio:1.5) {
.border-1px{
&::after{
-webkit-transform: scaleY(0.7);
transform: scaleY(0.7);
}
}
}
@ media (- webkit-min-device-pixel-ratio:2), (min-device-pixel-ratio:2) {
.border-1px{
&::after{
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
}
}