根本原因: - 按钮使用了 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user