diff --git a/assets/style/border_1px/border_1px.scss b/assets/style/border_1px/border_1px.scss new file mode 100644 index 0000000..05c6219 --- /dev/null +++ b/assets/style/border_1px/border_1px.scss @@ -0,0 +1,35 @@ +//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); diff --git a/assets/style/border_1px/index.scss b/assets/style/border_1px/index.scss new file mode 100644 index 0000000..05c6219 --- /dev/null +++ b/assets/style/border_1px/index.scss @@ -0,0 +1,35 @@ +//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); diff --git a/assets/style/common/index.scss b/assets/style/common/index.scss new file mode 100644 index 0000000..c583b03 --- /dev/null +++ b/assets/style/common/index.scss @@ -0,0 +1,3 @@ +.h-100{ + height: 100vh; +} \ No newline at end of file diff --git a/assets/style/_global.scss b/assets/style/global.scss similarity index 93% rename from assets/style/_global.scss rename to assets/style/global.scss index 8ff6729..56f8e67 100644 --- a/assets/style/_global.scss +++ b/assets/style/global.scss @@ -2,6 +2,8 @@ @import "./var.scss"; @import "./common.scss"; +@import "./common/index.scss"; +@import "./border_1px/index.scss"; html{ min-width: 100vw; diff --git a/layouts/default copy.vue b/layouts/default copy.vue new file mode 100644 index 0000000..33d25be --- /dev/null +++ b/layouts/default copy.vue @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + 导航首页 + + + + + + 前端技术 + + + + + + 导航首页 + + + + + + dsa + + + + + + + + + + diff --git a/layouts/default.vue b/layouts/default.vue index ec90867..291af1b 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,8 +1,8 @@ - - + + + + dsa + @@ -63,21 +66,15 @@ export default { };