diff --git a/css/common.css b/css/common.css index 61fb540..e9e0c91 100644 --- a/css/common.css +++ b/css/common.css @@ -171,15 +171,20 @@ header:hover { .user-dropdown { display: none; position: absolute; - top: calc(100% + 8px); - right: 0; + top: 100%; + right: -10px; min-width: 140px; + padding-top: 10px; + z-index: 1000; +} + +.user-dropdown-inner { background: #1F2937; border-radius: 12px; padding: 6px 0; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); - z-index: 1000; + position: relative; } .user-avatar-wrap:hover .user-dropdown { @@ -187,7 +192,7 @@ header:hover { } /* 下拉箭头 */ -.user-dropdown::before { +.user-dropdown-inner::before { content: ''; position: absolute; top: -6px; diff --git a/public/header.html b/public/header.html index 797d45e..5289cd3 100644 --- a/public/header.html +++ b/public/header.html @@ -48,8 +48,10 @@
-
个人资料
-
退出登录
+
+
个人资料
+
退出登录
+