From 28a89a477c345f1af215458497fd629c72a0d705 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Wed, 17 Dec 2025 17:01:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8=E7=AB=AF(7?= =?UTF-8?q?67px)=E6=B3=A8=E5=86=8C=E6=8C=89=E9=92=AE=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E5=85=B3=E9=94=AE=E9=97=AE=E9=A2=98=20-=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8align-items:=20stretch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 核心问题: - 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 --- css/index.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/css/index.css b/css/index.css index 3a92fa7..0107441 100644 --- a/css/index.css +++ b/css/index.css @@ -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; }