From 0ef0112cd98cb69c90476a9752a3562114974121 Mon Sep 17 00:00:00 2001 From: JSR Date: Thu, 19 Mar 2026 18:59:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DiOS=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=AB=98=E5=BA=A6=E4=B8=8D=E8=B6=B3=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E9=BB=91=E8=BE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/main.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/assets/main.css b/src/assets/main.css index 8448651..189dd13 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,6 +1,7 @@ @import "antd/dist/reset.css"; :root { + --ss-app-height: 100vh; --ss-safe-area-top: env(safe-area-inset-top, 0px); --ss-safe-area-right: env(safe-area-inset-right, 0px); --ss-safe-area-bottom: env(safe-area-inset-bottom, 0px); @@ -13,10 +14,17 @@ sans-serif; } +@supports (height: 100dvh) { + :root { + --ss-app-height: 100dvh; + } +} + html, body, #root { - height: 100%; + height: var(--ss-app-height); + min-height: var(--ss-app-height); margin: 0; padding: 0; overflow: hidden; @@ -29,7 +37,6 @@ body, #root { width: 100%; - min-height: 100%; padding-top: var(--ss-safe-area-top); padding-right: var(--ss-safe-area-right); padding-bottom: var(--ss-safe-area-bottom);