瀏覽代碼

适配手机端

李富豪 4 月之前
父節點
當前提交
d311142299
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      app/components/deepSeekHome.scss

+ 7 - 2
app/components/deepSeekHome.scss

@@ -1,7 +1,12 @@
 .deekSeek {
   width: 100%;
-  height: 100vh;
+  /* 使用 fill-available 确保兼容性 */
+  height: -webkit-fill-available;
+  height: 100dvh;
+  /* 新的动态视口单位,推荐使用 */
   background: linear-gradient(90.52deg, rgba(24, 126, 255, 1) 1.54%, rgba(23, 66, 255, 1) 99.26%);
+  padding-bottom: env(safe-area-inset-bottom);
+  /* 适配底部安全区域 */
 
   &-header {
     width: 100%;
@@ -17,7 +22,7 @@
 
   &-content {
     width: 100%;
-    height: calc(100vh - 60px);
+    height: calc(100% - 80px - env(safe-area-inset-bottom));
     display: flex;
     justify-content: center;
     align-items: center;