From ec2dca619a078e20f6a7af5403438cb0a11d6b19 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Fri, 20 Mar 2026 20:50:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=B4=E5=83=8F=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E8=8F=9C=E5=8D=95hover=E9=97=B4=E9=9A=99=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E5=B9=B3=E6=BB=91=E6=BB=91=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/common.css | 13 +++++++++---- public/header.html | 6 ++++-- 2 files changed, 13 insertions(+), 6 deletions(-) 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 @@
-
个人资料
-
退出登录
+
+
个人资料
+
退出登录
+