From 3dde06f903d27342c616cb728733bb69c34b0a39 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Wed, 17 Dec 2025 13:43:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B3=A8=E5=86=8C=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=E5=9C=A8=E4=B8=8B?= =?UTF-8?q?=E5=8D=8A=E9=83=A8=E5=88=86=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根本原因: - 按钮使用了 align-items: center,导致内容垂直居中 - 按钮使用了固定高度,没有充满 nav-header 的完整高度 解决方案: - 改为 align-items: flex-start,让内容从顶部开始排列 - 按钮高度改为 height: 100%,充分填充 nav-header 高度 - 在所有三个移动端断点和桌面端应用这个改变 - 添加小的 padding-top (2-3px) 来微调上方间距 现在注册按钮会完全占满导航栏的高度,图标和文字从顶部开始显示 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- css/index.css | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/css/index.css b/css/index.css index 2b9a31c..ff531c6 100644 --- a/css/index.css +++ b/css/index.css @@ -140,7 +140,7 @@ /* 注册按钮 - 渐变背景样式,撑满高度 */ #index .no-login .btn.btn-normal#registBtn { display: flex !important; - align-items: center !important; + align-items: flex-start !important; justify-content: center !important; gap: 8px !important; padding: 0 36px !important; @@ -159,6 +159,8 @@ min-width: 120px !important; flex-shrink: 0 !important; box-shadow: none !important; + height: 100% !important; + padding-top: 3px !important; } /* 注册按钮文字 - 确保始终在最上层 */ @@ -2551,15 +2553,16 @@ html { padding: 0 10px !important; font-size: 10px !important; min-width: auto !important; - height: 46px !important; + height: 100% !important; line-height: 1 !important; display: flex !important; - align-items: center !important; + align-items: flex-start !important; justify-content: center !important; margin: 0 !important; border: none !important; background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%) !important; flex-shrink: 0 !important; + padding-top: 2px !important; } #index .no-login .btn.btn-normal#registBtn::before { @@ -3108,10 +3111,10 @@ html { padding: 0 10px !important; font-size: 10px !important; min-width: auto !important; - height: 44px !important; + height: 100% !important; line-height: 1 !important; display: flex !important; - align-items: center !important; + align-items: flex-start !important; justify-content: center !important; margin: 0 !important; border: none !important; @@ -3610,10 +3613,10 @@ html { padding: 0 8px !important; font-size: 9px !important; min-width: auto !important; - height: 40px !important; + height: 100% !important; line-height: 1 !important; display: flex !important; - align-items: center !important; + align-items: flex-start !important; justify-content: center !important; margin: 0 !important; border: none !important;