Browse Source

feat: add less mixins

xutongzee 1 year ago
parent
commit
22e5f7763e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/styles/mixins.less

+ 6 - 0
src/styles/mixins.less

@@ -0,0 +1,6 @@
+.bg-img(@url) {
+    background-image: url("@{url}@1x.png");
+    @media (-webkit-min-device-pixel-ratio:2),(min-device-pixel-ratio:2) {
+        background-image: url("@{url}@2x.png")
+    }
+}