打发发
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-24 00:34:12 +08:00
parent 32a0941053
commit 8d8cba048f
4 changed files with 90 additions and 44 deletions

View File

@@ -967,6 +967,27 @@
} }
/* 回到顶部按钮特殊样式 */
.aside-tools .tools-list .tools-item.back-top {
cursor: pointer;
background: rgba(56, 189, 248, 0.15);
transition: all 0.3s ease;
}
.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 img {
transition: transform 0.3s ease;
}
.aside-tools .tools-list .tools-item.back-top:hover img {
transform: translateY(-3px);
}
.flex-none { .flex-none {
flex-wrap: none !important; flex-wrap: none !important;
} }

View File

@@ -314,4 +314,23 @@ $(function () {
$(".go-ticket-btn").click(function () { $(".go-ticket-btn").click(function () {
location.href = "home.htm"; location.href = "home.htm";
}); });
// 回到顶部功能
$("#backTop").click(function () {
$("html, body").animate({ scrollTop: 0 }, 600);
});
// 根据滚动位置显示/隐藏回到顶部按钮
$(window).scroll(function () {
if ($(this).scrollTop() > 300) {
$("#backTop").fadeIn();
} else {
$("#backTop").fadeOut();
}
});
// 初始化时隐藏回到顶部按钮
if ($(window).scrollTop() <= 300) {
$("#backTop").hide();
}
}); });

View File

@@ -144,8 +144,8 @@
justify-content: center !important; justify-content: center !important;
gap: 8px !important; gap: 8px !important;
padding: 0 48px !important; padding: 0 48px !important;
font-size: 14px !important; font-size: 16px !important;
font-weight: 500 !important; font-weight: 600 !important;
color: #ffffff !important; color: #ffffff !important;
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%) !important; background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%) !important;
border: none !important; border: none !important;
@@ -159,6 +159,7 @@
min-width: 140px !important; min-width: 140px !important;
flex-shrink: 0 !important; flex-shrink: 0 !important;
box-shadow: none !important; box-shadow: none !important;
z-index: 1 !important;
} }
/* 注册按钮图标 */ /* 注册按钮图标 */
@@ -172,7 +173,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
position: relative; position: relative;
z-index: 2; z-index: 3;
flex-shrink: 0; flex-shrink: 0;
} }
@@ -188,7 +189,7 @@
opacity: 0; opacity: 0;
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
pointer-events: none; pointer-events: none;
z-index: 1; z-index: 0;
} }
#index .no-login .btn.btn-normal#registBtn:hover { #index .no-login .btn.btn-normal#registBtn:hover {

View File

@@ -95,6 +95,11 @@
<!-- 侧边 --> <!-- 侧边 -->
<div class="aside-tools"> <div class="aside-tools">
<div class="tools-list"> <div class="tools-list">
<!-- 回到顶部按钮 - 固定在第一位 -->
<div class="tools-item back-top" id="backTop">
<img src="/web/BlackFruit-web/assets/img/index/top.png" alt="回到顶部">
</div>
{if ( isset($data.side_floating_window) ) } {if ( isset($data.side_floating_window) ) }
{foreach $data.side_floating_window as $key=>$value} {foreach $data.side_floating_window as $key=>$value}
<div class="tools-item"> <div class="tools-item">