From 5c12a8e885345ff37b66ad5c2d3fb9c722361ac2 Mon Sep 17 00:00:00 2001 From: mxr612 Date: Sun, 9 Mar 2025 14:22:01 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E6=A0=B7=E5=BC=8F=E5=92=8C=E6=8F=90=E4=BA=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/styles.css | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/static/styles.css b/static/styles.css index 00b7e71..52cba91 100644 --- a/static/styles.css +++ b/static/styles.css @@ -2,15 +2,10 @@ body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; - padding: 0; - padding-top: 20px; /* 使用 flexbox 布局实现 body 内元素的居中 */ display: flex; justify-content: center; align-items: center; - /* 确保 body 至少占据整个视口的高度 */ - min-height: 100vh; - margin: 0; padding-top: 80px; /* 增加顶部内边距避免内容被导航栏遮挡 */ min-height: calc(100vh - 80px); @@ -74,8 +69,7 @@ main { color: #333; width: 40%; max-width: 1200px; - /* 保留 margin: 0 auto; 用于水平居中 */ - margin: 0 auto; + } .scale-list .title { @@ -87,6 +81,11 @@ main { } @media (max-width: 768px) { + body { + justify-content: baseline; + align-items: baseline; + } + nav { .menu-toggle { display: block; @@ -110,11 +109,8 @@ main { } main { + box-shadow: 0 0 10px rgba(0, 0, 0, 0); width: 95%; - /* 全屏展示 */ - padding-top: 10px; - padding: 10px; - /* 适当调整内边距 */ } } @@ -141,9 +137,11 @@ main { } input[type="submit"] { + margin-top: 20px; + margin-left: 5px; background-color: #000000; color: rgb(255, 255, 255); - padding: 10px 20px; + padding: 15px 30px; border: none; border-radius: 4px; cursor: pointer;