测试
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-22 23:28:20 +08:00
parent 3a3168a6f8
commit 716fe9c7f2
2 changed files with 1424 additions and 432 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,55 @@
$(function () { $(function () {
// ============================================
// 滚动动画效果 - Intersection Observer
// ============================================
function initScrollAnimations() {
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animated');
// 一次性动画,触发后不再观察
observer.unobserve(entry.target);
}
});
}, observerOptions);
// 为所有section添加滚动动画
document.querySelectorAll('.section').forEach((section, index) => {
section.classList.add('animate-on-scroll');
observer.observe(section);
});
// 为服务卡片添加延迟动画
document.querySelectorAll('.service-box').forEach((box, index) => {
box.classList.add('animate-on-scroll', `delay-${(index % 3) + 1}`);
observer.observe(box);
});
// 为解决方案卡片添加动画
document.querySelectorAll('.resolve-box').forEach((box, index) => {
box.classList.add('animate-on-scroll', `delay-${(index % 4) + 1}`);
observer.observe(box);
});
// 为新闻列表添加动画
document.querySelectorAll('.news-cont').forEach(cont => {
cont.classList.add('scale-on-scroll');
observer.observe(cont);
});
}
// 页面加载完成后初始化动画
setTimeout(initScrollAnimations, 100);
// ============================================
// 原有功能代码
// ============================================
// 获取url地址栏参数函数 // 获取url地址栏参数函数
function getUrlParams() { function getUrlParams() {
const url = window.location.href; const url = window.location.href;