wow.js发生在页面加载而不是滚动 [英] wow.js happens on page load and not on scroll

查看:657
本文介绍了wow.js发生在页面加载而不是滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 wow.js ,它可以正常工作,除了动画都会在网页加载后立即发生,而不是当它们滚动到。我按照文档,但不能弄清楚。

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 figure it out.

页面上没有JS错误。我在正文中包括animate.min.css和wow.js

There are no JS errors on the page. I included both animate.min.css and wow.js

<img src="images/philosophy.png" alt="Philosophy" id="philosophy-img" class="icon wow bounceInUp">

和页脚:

<script>
    new WOW().init();
</script>

那么如何使用wow.js来获取滚动到特定div的动画? / p>

So how can use wow.js to get the animations to happen when scrolling to a particular div?

推荐答案

以下是我通过关闭Github问题:您可以将其添加到您的CSS:

Here's the solution I found via a closed Github Issue: you can add this to your CSS:

.wow {
   visibility: hidden;
}

WOW会在开始动画时将其切换为可见。

WOW will then toggle it to visible when starting the animation.

这篇关于wow.js发生在页面加载而不是滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆