wow.js happens on page load and not on scroll

后端 未结 9 1055
孤独总比滥情好
孤独总比滥情好 2020-12-16 12:32

I\'m using wow.js, and it works fine, except the animations all happen immediately after the page load, and not when they are scrolled to. I followed the docs, but can\'t fi

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 12:52

    I had a similar problem today, because I was using a fixed navigation bar width a height of 160px the content was loaded before I could see it.

    I solved it by adding an offset in the WOW initialization :

    new WOW({offset: 160 }).init()
    

    Hope it could help.

提交回复
热议问题