gpt4 book ai didi

AOS(Animation On Scroll) Library doesn't work with SmoothScrollbar-js(AOS(动画滚动)库不适用于SmoothScrollbar js)

转载 作者:bug小助手 更新时间:2023-10-22 17:34:32 29 4
gpt4 key购买 nike



I'm using SmoothScrollbar Library and AOS in my HTML website. But AOS animation is not working. Below is my JS code:

我在我的HTML网站上使用SmoothScrollbar库和AOS。但是AOS动画不起作用。下面是我的JS代码:


// ====== SMOOTH SCROLL ======
var Scrollbar = window.Scrollbar;
Scrollbar.init(document.querySelector('#smooth_scrollbar'), {
damping: 0.05, // Controls the damping effect
alwaysShowTracks: true, // Always show scrollbar tracks
});


// ==== AOS ANIMATION ====
$(document).ready(function () {
setTimeout(() => {
AOS.init({
offset: 120,
});
}, 120);
// AOS.init();
})

When I remove the Smooth Scroll code, AOS works fine. Please help!

当我删除平滑滚动代码时,AOS工作正常。请帮忙!


As I checked the code in Inspect, aos-animate class is not adding. Here is Screenshot: Inspect Screenshot

当我在Inspect中检查代码时,aos animate类没有添加。这是屏幕截图:


更多回答
优秀答案推荐
更多回答

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com