new WOW().init();
const scroll = new LocomotiveScroll({
el: document.querySelector("[data-scroll-container]"),
smooth: true
});
以上是程序代码
请问有人能帮忙吗?谢谢
版本
WOW.js * V.1.1.3
locomotive-scroll * v4.1.3
补充一下:
依上方程序代码,将wow使用在DIV中时
<div class=”wow”>123</div>
123不在页面上,会是空白的。
DEMO:https://codepen.io/JU274/pen/vYWYQBQ
2个类库冲突了,改了下wow.js,但是只支持一个locomotive-scroll容器,init的时候传递locomotive-scroll容器容器进入添加事件
在线demo:
new WOW().init(document.querySelector("[data-scroll-container]"));
const scroll = new LocomotiveScroll({ el: document.querySelector("[data-scroll-container]"), smooth: true });