From 5208b7ccec7d7366c3ba4fc796052d0765a21d24 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 21 Sep 2026 12:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AA=84=E5=B1=8F=E4=B8=8B=E6=8A=8A=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=8E=A7=E4=BB=B6=E5=AD=97=E5=8F=B7=E6=8F=90=E5=88=B0?= =?UTF-8?q?=2016px=EF=BC=8C=E9=81=BF=E5=85=8D=20iOS=20=E8=81=9A=E7=84=A6?= =?UTF-8?q?=E6=94=BE=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - iOS Safari 聚焦字号小于 16px 的输入框时会放大整个页面,且忽略 viewport 的 user-scalable=no / maximum-scale,只能靠字号规避 - 该规则只在 max-width:600px 生效,1440 桌面端仍是 14px 不变 - viewport 补 maximum-scale=1 作为其他浏览器的兜底 --- index.html | 2 +- src/styles/theme.css | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 37781d1..f462a79 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + LionWebsite diff --git a/src/styles/theme.css b/src/styles/theme.css index 64ee70d..c548f97 100644 --- a/src/styles/theme.css +++ b/src/styles/theme.css @@ -1099,3 +1099,21 @@ button.page-current:hover { .el-input__inner { font-size: 14px; } + +/* ========== iOS focus-zoom guard (窄屏) ========== + iOS Safari 聚焦字号小于 16px 的输入控件时会放大整个页面,并忽略 viewport + 里的 user-scalable=no / maximum-scale。桌面端本身不做调整,只在窄屏(手机 + 打开桌面入口,或手机横竖屏)下把可聚焦控件拉到 16px;!important 用于压过 + Element Plus 的小尺寸变体。 */ +@media (max-width: 600px) { + input:not([type="checkbox"]):not([type="radio"]), + textarea, + select, + .el-input__inner, + .el-textarea__inner, + .el-select__input, + .el-select__wrapper, + .el-input-number .el-input__inner { + font-size: 16px !important; + } +}