From 580b972d59ea226fa0dc413cdd447d3135c3bf2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD?= Date: Thu, 12 Mar 2026 15:08:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E5=86=85=E4=B8=BB=E9=A2=98=E6=8C=89=E9=92=AE=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 .quick-nav .theme-toggle 样式,设置 position: static - 让主题按钮跟随导航栏 flex 布局,与其他按钮对齐 - 删除重复的样式定义 - 更新 CSS 版本号 --- static/css/style.css | 28 +++------------------------- templates/index.html | 2 +- templates/login.html | 2 +- templates/register.html | 2 +- templates/welcome.html | 2 +- 5 files changed, 7 insertions(+), 29 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 81676bf..e7dc998 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -255,7 +255,7 @@ h1 { } } -/* 主题切换按钮 - 独立版本(body直接子元素) */ +/* 主题切换按钮 - 独立版本 */ .theme-toggle { position: fixed; top: 20px; @@ -289,34 +289,12 @@ h1 { transform: scale(0.95); } -/* 主题切换按钮 - 集成到导航栏 */ +/* 主题切换按钮 - 在导航栏内 */ .quick-nav .theme-toggle { + position: static; width: 40px; height: 40px; - border-radius: 50%; - border: none; - background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%); - color: white; font-size: 20px; - cursor: pointer; - transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); - display: flex; - align-items: center; - justify-content: center; - touch-action: manipulation; - -webkit-tap-highlight-color: transparent; - -webkit-touch-callout: none; - user-select: none; -} - -.quick-nav .theme-toggle:hover { - transform: rotate(20deg) scale(1.1); - box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); -} - -.quick-nav .theme-toggle:active { - transform: scale(0.95); } /* 表单样式 */ diff --git a/templates/index.html b/templates/index.html index 1ad99ae..c00da97 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,7 @@ 欢迎 - 云下飞 - + diff --git a/templates/login.html b/templates/login.html index bf342aa..4b88cb6 100644 --- a/templates/login.html +++ b/templates/login.html @@ -4,7 +4,7 @@ 登录 - 云下飞 - + diff --git a/templates/register.html b/templates/register.html index 954bd1c..07f1ba3 100644 --- a/templates/register.html +++ b/templates/register.html @@ -4,7 +4,7 @@ 注册 - 云下飞 - + diff --git a/templates/welcome.html b/templates/welcome.html index 5772ace..cec267a 100644 --- a/templates/welcome.html +++ b/templates/welcome.html @@ -4,7 +4,7 @@ 欢迎回来 - {{ username }} - +