javascript Wow.js 不会加载延迟超过 1 秒的动画。为什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25373968/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Wow.js doesn't load animations with delay of more than 1s. Why?
提问by alejorivera
I'm using animate.css with wow.js.
我在 wow.js 中使用 animate.css。
The third one, with a data delay of more than one second, doesn't fadeInLeft. It fades in normally (not from left).
第三个,数据延迟超过一秒,不会fadeInLeft。它正常淡入(不是从左侧)。
Anyone has encountered this problem before? How can I fix it?
有没有人遇到过这个问题?我该如何解决?
--
——
This is my view. I have three list items on the page.
这是我的看法。我在页面上有三个列表项。
<li>
<span class="fadeInLeft wow" data-wow-delay="300ms">Text1</span>
</li>
<li>
<span class="fadeInLeft wow" data-wow-delay="800ms">Text2</span>
</li>
<li>
<span class="fadeInLeft wow" data-wow-delay="1200ms">Text2</span>
</li>
采纳答案by Jonathan Hine
I know this thread is a tad old but figured I'd post what I know of this:
我知道这个线程有点旧,但我想我会发布我所知道的:
Try using a section class.
尝试使用部分类。
<section class="wow slideInLeft" data-wow-duration="2s" data-wow-delay="0.3s"><li>Text1</li></section>
<section class="wow slideInLeft" data-wow-duration="2s" data-wow-delay="0.8s"><li>Text2</li></section>
<section class="wow slideInLeft" data-wow-duration="2s" data-wow-delay="1.2s"><li>Text3</li></section>
回答by DavieFL
I also had the same issue. I found a workaround which was to add these inline styles:
我也有同样的问题。我找到了一种解决方法,即添加这些内联样式:
style="-webkit-animation-duration: 3s;-moz-animation-duration: 3s;animation-duration: 3s;"
style="-webkit-animation-duration: 3s;-moz-animation-duration: 3s;animation-duration: 3s;"
回答by user20889
Make sure that you are your script is correct and that you are correctly typing "wow.js" OR "wow.min.js" for the minimal version. If not you will have animations but no wow.js delaying or scrolling.
确保您的脚本是正确的,并且您为最小版本正确键入了“wow.js”或“wow.min.js”。如果没有,您将有动画但没有 wow.js 延迟或滚动。
<script src='js/wow.min.js'></script>
<script>
new WOW().init();
</script>
回答by Nice-Guy
The Wow.js api uses seconds units for animations as well.
Wow.js api 也使用秒单位来制作动画。
For example, data-wow-delay="2s" will work just fine. I'm not sure for about "1.2."
例如, data-wow-delay="2s" 就可以正常工作。我不确定“1.2”。
Try it out and let me know if that works for you.
试试看,让我知道它是否适合你。