From 74621e2ea03e377af6691e2e23c8d01a9b8dc045 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Thu, 25 Dec 2025 15:25:21 +0800 Subject: [PATCH] revert 8d862e3a1140d0dca139375efe68637673b935ad MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit revert 紧急修复:为 nav-right 添加 flex-shrink 和 min-height 防止高度坍塌 问题根源: - 虽然设置了 align-items: stretch 和 height: 100%,但 nav-right 仍被计算为 0px - 原因是 flex 容器中的 nav-right 被隐式设置为 flex-shrink: 1(默认值),导致在计算时被压缩 - 同时缺少 min-height 导致可能的进一步坍塌 关键修复属性: - flex-shrink: 0 - 防止 flex 项在 nav-header 中被压缩 - min-height: 50px/48px/44px - 设置明确的最小高度作为备份(对应各断点的 nav-header 高度) 修改范围: 767px 断点(common.css + index.css): - .nav-header .nav-right 添加 flex-shrink: 0; min-height: 50px; - .nav-right 添加 flex-shrink: 0; min-height: 50px; 575px 断点(common.css + index.css): - 同上,但 min-height: 48px 360px 断点(index.css): - 同上,但 min-height: 44px 基础规则保持不变 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- common/common.css | 14 ++------------ css/index.css | 12 ------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/common/common.css b/common/common.css index a127092..a19630e 100644 --- a/common/common.css +++ b/common/common.css @@ -1303,29 +1303,24 @@ padding: 0 12px; display: flex !important; align-items: stretch !important; - justify-content: space-between !important; } .nav-header .nav-left { display: flex !important; align-items: stretch !important; - flex: 0 1 auto; + flex: 1; } .nav-header .nav-right { display: flex !important; align-items: stretch !important; height: 100% !important; - flex-shrink: 0; - min-height: 50px; } .nav-right { display: flex !important; align-items: stretch !important; height: 100% !important; - flex-shrink: 0; - min-height: 50px; } .nav-header .nav-left .nav-icon img { @@ -1519,29 +1514,24 @@ padding: 0 10px; display: flex !important; align-items: stretch !important; - justify-content: space-between !important; } .nav-header .nav-left { display: flex !important; align-items: stretch !important; - flex: 0 1 auto; + flex: 1; } .nav-header .nav-right { display: flex !important; align-items: stretch !important; height: 100% !important; - flex-shrink: 0; - min-height: 48px; } .nav-right { display: flex !important; align-items: stretch !important; height: 100% !important; - flex-shrink: 0; - min-height: 48px; } .nav-header .nav-left .nav-icon img { diff --git a/css/index.css b/css/index.css index 62fe778..263689c 100644 --- a/css/index.css +++ b/css/index.css @@ -2515,8 +2515,6 @@ html { align-items: center !important; height: 100% !important; flex-wrap: nowrap !important; - flex-shrink: 0; - min-height: 50px; } /* 默认隐藏所有的桌面端导航链接 */ @@ -2547,8 +2545,6 @@ html { justify-content: flex-end; gap: 6px; height: 100% !important; - flex-shrink: 0; - min-height: 50px; } #index .nav-right .nav-text-link { @@ -3159,8 +3155,6 @@ html { display: flex !important; align-items: stretch !important; height: 100% !important; - flex-shrink: 0; - min-height: 48px; } #index .nav-header .nav-left .nav-icon { @@ -3180,8 +3174,6 @@ html { justify-content: flex-end; gap: 4px; height: 100% !important; - flex-shrink: 0; - min-height: 48px; } #index .nav-right .nav-text-link { @@ -3670,8 +3662,6 @@ html { display: flex !important; align-items: stretch !important; height: 100% !important; - flex-shrink: 0; - min-height: 44px; } #index .nav-header .nav-left .nav-icon { @@ -3699,8 +3689,6 @@ html { justify-content: flex-end; gap: 4px; height: 100% !important; - flex-shrink: 0; - min-height: 44px; } /* 移动端隐藏登录按钮和分隔符,只显示注册按钮 */