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

This commit is contained in:
yiqiu
2025-11-23 01:08:42 +08:00
parent 635bc9b913
commit 8ff4c21c57
2 changed files with 27 additions and 5 deletions

View File

@@ -20,10 +20,10 @@
padding-right: var(--container-padding-x);
}
/* 首页 Header 深色玻璃态覆盖 */
/* 首页 Header 深色玻璃态覆盖 - 确保最高层级 */
#index #header {
background: transparent;
z-index: 999;
z-index: 9999 !important;
}
#index .nav-shadow {
@@ -72,12 +72,12 @@
background: rgba(56, 189, 248, 0.1);
}
/* 首页下拉菜单优化 */
/* 首页下拉菜单优化 - 确保高层级 */
#index .nav-cont {
background: rgba(15, 23, 42, 0.95);
backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(148, 163, 184, 0.15);
z-index: 998;
z-index: 9998 !important;
}
#index .nav-item-box {
@@ -1817,7 +1817,12 @@ html {
#index .section.banner {
background: transparent;
position: relative;
z-index: 0;
z-index: 0 !important;
}
/* banner 整体容器也降到最低 */
#index .banner-cont {
z-index: 0 !important;
}
#index .section.service {

View File

@@ -1,6 +1,9 @@
$(function () {
console.log('tools.js loaded');
// 产品详情页的图片预览轮播(仅在存在时初始化)
if ($('.gallery-thumbs').length > 0 && $('.gallery-top').length > 0) {
console.log('Initializing gallery swiper');
var galleryThumbs = new Swiper('.gallery-thumbs', {
spaceBetween: 10,
slidesPerView: 10,
@@ -23,6 +26,9 @@ $(function () {
// 首页 Banner 轮播(仅在存在时初始化)
if ($('.banner-cont').length > 0) {
console.log('Found .banner-cont, initializing banner swiper');
console.log('Number of slides:', $('.banner-cont .swiper-slide').length);
const mySwiper = new Swiper(".banner-cont", {
loop: true, // 循环模式选项
autoplay: {
@@ -39,6 +45,7 @@ $(function () {
// 监听切换事件,重置进度条动画
on: {
slideChange: function () {
console.log('Slide changed');
// 移除所有进度条动画
document.querySelectorAll('.banner-cont .swiper-pagination-bullet').forEach(function(bullet) {
bullet.classList.remove('progress-active');
@@ -47,18 +54,28 @@ $(function () {
const activeBullet = document.querySelector('.banner-cont .swiper-pagination-bullet-active');
if (activeBullet) {
activeBullet.classList.add('progress-active');
console.log('Added progress-active to bullet');
}
},
init: function () {
console.log('Swiper initialized');
console.log('Pagination bullets:', document.querySelectorAll('.swiper-pagination-bullet').length);
// 初始化时给第一个添加进度动画
setTimeout(function() {
const activeBullet = document.querySelector('.banner-cont .swiper-pagination-bullet-active');
if (activeBullet) {
activeBullet.classList.add('progress-active');
console.log('Added initial progress-active to bullet');
} else {
console.log('No active bullet found');
}
}, 100);
}
}
});
console.log('Banner swiper created:', mySwiper);
} else {
console.log('.banner-cont not found');
}
})