瀏覽代碼

解决人物变色时抖动的问题

任一存 3 年之前
父節點
當前提交
4ec3a609ae
共有 1 個文件被更改,包括 27 次插入3 次删除
  1. 27 3
      src/views/HomeView.vue

+ 27 - 3
src/views/HomeView.vue

@@ -455,8 +455,8 @@ export default {
   > .people-far-wrap {
     position: absolute;
     top: 20%;
-    height: 70vh;
-    width: calc(70vh * 400 / 600);
+    height: 630px;
+    width: 420px;
     overflow: hidden;
     > .people-far {
       position: absolute;
@@ -478,7 +478,7 @@ export default {
       top: 17%;
     }
   }
-  .people-near-wrap {
+  > .people-near-wrap {
     position: absolute;
     bottom: -13%;
     height: 100vh;
@@ -525,5 +525,29 @@ export default {
       object-fit: cover;
     }
   }
+  @media screen and (max-height: 810px) {
+    .people-far-wrap {
+      height: 540px;
+      width: 360px;
+    }
+  }
+  @media screen and (max-height: 720px) {
+    .people-far-wrap {
+      height: 480px;
+      width: 320px;
+    }
+  }
+  @media screen and (max-height: 630px) {
+    .people-far-wrap {
+      height: 420px;
+      width: 280px;
+    }
+  }
+  @media screen and (max-height: 540px) {
+    .people-far-wrap {
+      height: 360px;
+      width: 240px;
+    }
+  }
 }
 </style>