修复手机端无法滚动:添加 viewport meta 标签并在移动端允许根容器垂直滚动

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
AmandaloveYang
2026-05-12 10:06:12 +08:00
parent c56c490b60
commit ff4c8b0139
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -25,6 +25,7 @@ export default function RootLayout({
return (
<html lang="zh-CN" className="dark">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
@@ -120,3 +120,13 @@
background: #dbeafe;
filter: saturate(0.95) brightness(1.12);
}
/* ── Mobile: allow vertical scrolling ── */
@media (max-width: 768px) {
.root {
overflow: auto;
height: auto;
min-height: 100vh;
width: 100%;
}
}