jQuery waypoints delays

。_饼干妹妹 提交于 2019-12-24 11:21:17

问题


I have three elements that I want to fadeInUp when I scroll over to them. But, now comes the delay part, I want the two elements appear after the first one has appeared. But, the problem is that, it's not happening as expected, they are all showing up at the same time. Here's the fiddle : Fiddle

I want the two yellow circles to appear after the first one with delays of 0.5s and 1s respectively. I've tried adding the class "delay-05s" and "delay-1s" to the elements but for a reason, It's not happening. Also, here's a template that I'm trying to mimic, go over there and you'll see : Halcyon Days BootStrap Template


回答1:


You are very nearly there.

Adding classes to use CSS animation delays was the right way to go, but those classes weren't defined anywhere!

Just include some CSS to apply the animation delays:

.delay-05s {
    -webkit-animation-delay: 0.5s;
    animation-delay: 0.5s;
}

.delay-1s {
    -webkit-animation-delay: 1s;
    animation-delay: 1s;
}

http://jsfiddle.net/4FNFW/141/



来源:https://stackoverflow.com/questions/28279025/jquery-waypoints-delays

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!