From 2017dfddfa1f9f3031b48e8407e072f1f4fa05ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= Date: Wed, 7 Jan 2026 23:08:47 +0800 Subject: [PATCH] =?UTF-8?q?style(css):=20=E8=B0=83=E6=95=B4=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除下拉菜单的 z-index 属性 - 为导航折叠内容添加左右边框样式 - 简化边框隐藏的 CSS 规则 - 添加 border-block 样式属性 - 移除导航边框的 z-index 层级设置 --- src/App.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.css b/src/App.css index 3209bb9..53a6f1e 100644 --- a/src/App.css +++ b/src/App.css @@ -76,7 +76,6 @@ border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); min-width: 120px; - z-index: 1000; margin-top: 8px; flex-direction: column; gap: 0; @@ -170,6 +169,8 @@ right: 0; margin-top: 0; border-radius: 8px; + border-left: none; + border-right: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); max-height: 0; overflow: hidden; @@ -178,8 +179,7 @@ visibility: visible; /* 覆盖默认的visibility: hidden */ transform: none; /* 覆盖默认的transform */ display: block; /* 覆盖默认的display: none,使用block而不是flex */ - /* 移除边框,避免横线显示 */ - border-style: none; + border: none; /* 移除边框,避免横线显示 */ } .nav-collapse-content.show { @@ -244,6 +244,7 @@ max-height: 0; overflow: hidden; transition: max-height 0.3s ease; + border-block: 0px; } .nav-collapse-content.show { @@ -298,7 +299,6 @@ right: 0; height: 1px; background-color: #e5e5e5; - z-index: 1001; /* 确保边框在导航栏上方,但在展开菜单下方 */ } /* 当菜单展开时,允许换行并显示所有可见项 */