From 03c28bf66e37a8545e9eb5f0659b3197f8c084c3 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Mon, 24 Nov 2025 00:47:46 +0800 Subject: [PATCH] ioio --- common/common.css | 69 +++++++++++++++++++++++++++------------------- common/common.js | 6 ++-- index.html | 2 +- public/header.html | 10 +++---- 4 files changed, 49 insertions(+), 38 deletions(-) diff --git a/common/common.css b/common/common.css index 74ac586..395f295 100644 --- a/common/common.css +++ b/common/common.css @@ -794,6 +794,46 @@ + +/* 回到顶部按钮 - 独立样式 */ +.back-top-wrapper { + position: fixed; + top: calc(45% - 80px); + right: 0; + z-index: 4; + transform: translateY(-50%); + width: 50px; + height: 50px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + background: rgba(15, 23, 42, 0.9); + backdrop-filter: blur(20px); + box-shadow: 0 8px 32px rgba(15, 23, 42, 0.6); + border: 1px solid rgba(148, 163, 184, 0.15); + border-right: none; + border-radius: 8px 0 0 8px; + transition: all 0.3s ease; +} + +.back-top-wrapper img { + width: 20px; + height: 20px; + transition: all 0.3s ease; + filter: brightness(1.1); +} + +.back-top-wrapper:hover { + background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%); + box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4); +} + +.back-top-wrapper:hover img { + transform: translateY(-2px); + filter: brightness(1.3); +} + /* 侧边工具栏 - 深色科技风格 */ .aside-tools { position: fixed; @@ -967,35 +1007,6 @@ } -/* 回到顶部按钮特殊样式 */ -.aside-tools .tools-list .tools-item.back-top { - cursor: pointer; - background: rgba(56, 189, 248, 0.15); - transition: all 0.3s ease; - display: flex; - align-items: center; - justify-content: center; - padding: 13px; -} - -.aside-tools .tools-list .tools-item.back-top img { - width: 24px; - height: 24px; - transition: all 0.3s ease; - filter: brightness(1.1); -} - -.aside-tools .tools-list .tools-item.back-top:hover { - background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%); - box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4); -} - -.aside-tools .tools-list .tools-item.back-top:hover img { - transform: translateY(-3px); - filter: brightness(1.3); -} - - .flex-none { flex-wrap: none !important; } diff --git a/common/common.js b/common/common.js index 48eec4b..3568cb6 100644 --- a/common/common.js +++ b/common/common.js @@ -317,15 +317,15 @@ $(function () { // 回到顶部功能 $("#backTop").click(function () { - $("html, body").animate({ scrollTop: 0 }, 600); + $("html, body").animate({ scrollTop: 0 }, 300); }); // 根据滚动位置显示/隐藏回到顶部按钮 $(window).scroll(function () { if ($(this).scrollTop() > 300) { - $("#backTop").fadeIn(); + $("#backTop").fadeIn(300); } else { - $("#backTop").fadeOut(); + $("#backTop").fadeOut(300); } }); diff --git a/index.html b/index.html index 1769134..01b54cd 100644 --- a/index.html +++ b/index.html @@ -567,7 +567,7 @@ $(document).ready(function() { // 点击回到顶部 $("#backTop").click(function () { - $("html, body").animate({ scrollTop: 0 }, 600); + $("html, body").animate({ scrollTop: 0 }, 300); }); // 根据滚动位置显示/隐藏回到顶部按钮 diff --git a/public/header.html b/public/header.html index 3b30e68..2e9d5ce 100644 --- a/public/header.html +++ b/public/header.html @@ -93,13 +93,13 @@ + +
+ 回到顶部 +
+
- -
- 回到顶部 -
- {if ( isset($data.side_floating_window) ) } {foreach $data.side_floating_window as $key=>$value}