有没有办法使用animate.css循环组合动画?我试图反弹/滑动单词并让它们反弹

时间:2015-05-19 17:50:15

标签: jquery html css animation css-animations

基本上我试图仅使用bounceInLeft然后使用Dan Eden的animate.css创建一个文本幻灯片:https://daneden.github.io/animate.css/

我没有将这两个类应用于不起作用的标记,而是使用webkit动画在2秒后启动第二个动画。这有效,但只有一次,我想让它循环,但也有其他的话。我也尝试添加无限类,但它只重复上一个动画(bounceOutRight)。将第三和第四个动画添加到webkite动画也似乎不起作用。

我的javascript知识非常有限,我假设我只需要创建一个我想要的单词数组,然后让它们循环播放,但我不确定我会怎么做。任何帮助将不胜感激!

.bounceInLeft {
-webkit-animation: bounceInLeft 1s, bounceOutRight 2s;
-webkit-animation-delay: 0s, 1.5s;
}

2 个答案:

答案 0 :(得分:0)

这应该有效:

.bounceInLeft {
-webkit-animation: bounceInLeft 1s infinite, bounceOutRight 2s infinite;
-webkit-animation-delay: 0s, 1.5s;
}

如果你只在最后一个上添加它,它当然只会重复最后一个。

答案 1 :(得分:0)

找到一个执行此操作的jquery插件 http://morphist.fyianlai.com/