From d0e8b285e59ed6eff6c8f990247f6e6716a7c624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD?= Date: Thu, 12 Mar 2026 10:26:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=AC=A2=E8=BF=8E?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加独立版主题按钮样式(.container > .theme-toggle) - 按钮固定在右上角(position: fixed) - 区分导航栏集成的主题按钮样式 --- static/css/style.css | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 20139db..4c64246 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -255,8 +255,42 @@ h1 { } } +/* 主题切换按钮 - 独立版本(欢迎页面) */ +.container > .theme-toggle { + position: fixed; + top: 20px; + right: 20px; + width: 50px; + height: 50px; + border-radius: 50%; + border: none; + background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%); + color: white; + font-size: 24px; + cursor: pointer; + transition: all 0.3s ease; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); + z-index: 100; + display: flex; + align-items: center; + justify-content: center; + touch-action: manipulation; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; + user-select: none; +} + +.container > .theme-toggle:hover { + transform: rotate(20deg) scale(1.1); + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); +} + +.container > .theme-toggle:active { + transform: scale(0.95); +} + /* 主题切换按钮 - 集成到导航栏 */ -.theme-toggle { +.quick-nav .theme-toggle { width: 40px; height: 40px; border-radius: 50%; @@ -276,12 +310,12 @@ h1 { user-select: none; } -.theme-toggle:hover { +.quick-nav .theme-toggle:hover { transform: rotate(20deg) scale(1.1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); } -.theme-toggle:active { +.quick-nav .theme-toggle:active { transform: scale(0.95); }