From 6bc2b53381a8b32b21977f6f53a997f82be5d3e8 Mon Sep 17 00:00:00 2001 From: Lexcubia Date: Mon, 21 Apr 2025 11:47:15 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=80=82?= =?UTF-8?q?=E9=85=8D=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=BA=95=E9=83=A8=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E5=8C=BA=E5=9F=9F=E5=92=8C=E9=9A=90=E8=97=8F=E6=A8=AA?= =?UTF-8?q?=E5=90=91=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/style.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/style.css b/src/style.css index 265ef4a..71c27b1 100644 --- a/src/style.css +++ b/src/style.css @@ -26,6 +26,8 @@ body { margin: 0; padding: 0; height: 100vh; + height: -webkit-fill-available; /* 移动端浏览器兼容 */ + overflow-x: hidden; /* display: flex; place-items: center; min-width: 320px; */ @@ -66,6 +68,26 @@ button:focus-visible { margin: 0; padding: 0; font-weight: normal; + /* 添加底部安全区域 */ + padding-bottom: env(safe-area-inset-bottom); + padding-bottom: constant(safe-area-inset-bottom); +} + +/* 移动端适配 */ +@media screen and (max-width: 768px) { + html { + height: -webkit-fill-available; + } + + body { + min-height: 100vh; + min-height: -webkit-fill-available; + } + + #app { + min-height: 100vh; + min-height: -webkit-fill-available; + } } @media (prefers-color-scheme: light) {