style(css): 调整导航组件样式

- 移除下拉菜单的 z-index 属性
- 为导航折叠内容添加左右边框样式
- 简化边框隐藏的 CSS 规则
- 添加 border-block 样式属性
- 移除导航边框的 z-index 层级设置
This commit is contained in:
雨霖铃
2026-01-07 23:08:47 +08:00
parent 2673a86a52
commit 2017dfddfa
+4 -4
View File
@@ -76,7 +76,6 @@
border-radius: 8px; border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
min-width: 120px; min-width: 120px;
z-index: 1000;
margin-top: 8px; margin-top: 8px;
flex-direction: column; flex-direction: column;
gap: 0; gap: 0;
@@ -170,6 +169,8 @@
right: 0; right: 0;
margin-top: 0; margin-top: 0;
border-radius: 8px; border-radius: 8px;
border-left: none;
border-right: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
max-height: 0; max-height: 0;
overflow: hidden; overflow: hidden;
@@ -178,8 +179,7 @@
visibility: visible; /* 覆盖默认的visibility: hidden */ visibility: visible; /* 覆盖默认的visibility: hidden */
transform: none; /* 覆盖默认的transform */ transform: none; /* 覆盖默认的transform */
display: block; /* 覆盖默认的display: none,使用block而不是flex */ display: block; /* 覆盖默认的display: none,使用block而不是flex */
/* 移除边框,避免横线显示 */ border: none; /* 移除边框,避免横线显示 */
border-style: none;
} }
.nav-collapse-content.show { .nav-collapse-content.show {
@@ -244,6 +244,7 @@
max-height: 0; max-height: 0;
overflow: hidden; overflow: hidden;
transition: max-height 0.3s ease; transition: max-height 0.3s ease;
border-block: 0px;
} }
.nav-collapse-content.show { .nav-collapse-content.show {
@@ -298,7 +299,6 @@
right: 0; right: 0;
height: 1px; height: 1px;
background-color: #e5e5e5; background-color: #e5e5e5;
z-index: 1001; /* 确保边框在导航栏上方,但在展开菜单下方 */
} }
/* 当菜单展开时,允许换行并显示所有可见项 */ /* 当菜单展开时,允许换行并显示所有可见项 */