Nuxt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
994 B

//1px边框的解决方案
@mixin borderCreator($name, $direction, $type, $color) {
.border-#{$name} {
@if $direction!= "" {
border-#{$direction}: 1px $type $color;
} @else {
border: 1px $type $color;
}
}
@media screen and (-webkit-min-device-pixel-ratio: 2) {
.border-#{$name} {
@if $direction!= "" {
border-#{$direction}: 0.5px $type $color;
} @else {
border: 0.5px $type $color;
}
}
}
@media screen and (-webkit-min-device-pixel-ratio: 3) {
.border-#{$name} {
@if $direction!= "" {
border-#{$direction}: 0.333333px $type $color;
} @else {
border: 0.333333px $type $color;
}
}
}
}
@include borderCreator("box", "", solid, #0000002f);
@include borderCreator("right", "right", solid, #0000002f);
@include borderCreator("top", "top", solid, #0000002f);
@include borderCreator("bottom", "bottom", solid, #0000002f);
@include borderCreator("left", "left", solid, #0000002f);