From 58cc9997e37a9ecef1f9d1e54da0c333bfe11f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=99=BD?= Date: Thu, 12 Mar 2026 11:54:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E4=B8=BB=E9=A2=98=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=A7=BB=E5=88=B0body=E7=9B=B4=E6=8E=A5=E5=AD=90?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 按钮从 container 内部移到 body 直接子元素 - 使用 .theme-toggle 选择器替代 .container > .theme-toggle - 彻底解决按钮闪烁问题 - 更新 CSS 版本号 --- static/css/style.css | 8 ++++---- templates/index.html | 4 ++-- templates/login.html | 4 ++-- templates/register.html | 4 ++-- templates/welcome.html | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 2128b62..81676bf 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -255,8 +255,8 @@ h1 { } } -/* 主题切换按钮 - 独立版本(欢迎页面) */ -.container > .theme-toggle { +/* 主题切换按钮 - 独立版本(body直接子元素) */ +.theme-toggle { position: fixed; top: 20px; right: 20px; @@ -280,12 +280,12 @@ h1 { user-select: none; } -.container > .theme-toggle:hover { +.theme-toggle:hover { transform: rotate(20deg) scale(1.1); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); } -.container > .theme-toggle:active { +.theme-toggle:active { transform: scale(0.95); } diff --git a/templates/index.html b/templates/index.html index 82ff050..71dc293 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,11 +4,11 @@ 欢迎 - 云下飞 - + +
-
👋
diff --git a/templates/login.html b/templates/login.html index f8befa4..a6ad907 100644 --- a/templates/login.html +++ b/templates/login.html @@ -4,11 +4,11 @@ 登录 - 云下飞 - + +
-
🔐
diff --git a/templates/register.html b/templates/register.html index b6cee62..b717062 100644 --- a/templates/register.html +++ b/templates/register.html @@ -4,11 +4,11 @@ 注册 - 云下飞 - + +
-
📝
diff --git a/templates/welcome.html b/templates/welcome.html index bca5e2d..d8e24ac 100644 --- a/templates/welcome.html +++ b/templates/welcome.html @@ -4,7 +4,7 @@ 欢迎回来 - {{ username }} - +