修复移动端(767px)注册按钮不显示的关键问题 - 使用align-items: stretch
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
核心问题: - nav-header (50px) ✅ - nav-right (0px) ❌ → align-items: center导致子元素collapse - no-login (0px) ❌ → 继承父元素0px高度 - registBtn (0px) ❌ → 父元素高度为0px 修复内容: 1. 767px breakpoint - #index .nav-header .nav-right (line 2498-2501) 改为: align-items: stretch 2. 767px breakpoint - #index .no-login (line 2536-2542) 改为: align-items: stretch 3. 575px和360px breakpoint中的.no-login规则 改为: align-items: stretch 根本原因: 当flex容器使用align-items: center时,无intrinsic height的子元素会collapse到0px。 改用align-items: stretch后,子元素被拉伸以填充父容器高度。 结果: - nav-right height: 0px → 50px ✅ - no-login height: 0px → 50px ✅ - registBtn height: 0px → 50px ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2497,7 +2497,7 @@ html {
|
||||
|
||||
#index .nav-header .nav-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
#index .nav-menu {
|
||||
@@ -2518,7 +2518,7 @@ html {
|
||||
|
||||
#index .nav-right {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
align-items: stretch;
|
||||
justify-content: flex-end;
|
||||
gap: 6px;
|
||||
height: 100%;
|
||||
@@ -2536,7 +2536,7 @@ html {
|
||||
#index .no-login {
|
||||
display: flex !important;
|
||||
gap: 0 !important;
|
||||
align-items: center;
|
||||
align-items: stretch;
|
||||
height: 100% !important;
|
||||
order: 4;
|
||||
}
|
||||
@@ -3094,7 +3094,7 @@ html {
|
||||
#index .no-login {
|
||||
display: flex !important;
|
||||
gap: 0 !important;
|
||||
align-items: center;
|
||||
align-items: stretch;
|
||||
height: 100% !important;
|
||||
order: 4;
|
||||
}
|
||||
@@ -3598,7 +3598,7 @@ html {
|
||||
#index .no-login {
|
||||
display: flex !important;
|
||||
gap: 0 !important;
|
||||
align-items: center;
|
||||
align-items: stretch;
|
||||
height: 100% !important;
|
||||
order: 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user