【发布时间】:2015-07-09 11:04:53
【问题描述】:
我想使用 Dane Den 的 Animate.css 向我的一个 HTML 对象添加 2 种不同类型的动画。 https://github.com/daneden/animate.css
这可能吗?
【问题讨论】:
标签: css jquery-animate animate.css
我想使用 Dane Den 的 Animate.css 向我的一个 HTML 对象添加 2 种不同类型的动画。 https://github.com/daneden/animate.css
这可能吗?
【问题讨论】:
标签: css jquery-animate animate.css
使用 css 而不是类来做到这一点。 如果您使用类,最后一个将覆盖其他类。
animation-name: animation1, animation2, animation3;
例如:
如果您想使用bounce、flash 和pulse,您可以编写自己的类来做到这一点:
HTML
<div class="animated myAnimations"></div>
CSS
.myAnimations {
animation-name: bounce, flash, pulse;
-webkit-animation-name: bounce, flash, pulse;
/*
you can set different proporties to different animations too:
1s to bounce
2s to flash
3s to pulse
*/
animation-duration: 1s, 2s, 3s;
-webkit-animation-duration: 1s, 2s, 3s;
}
【讨论】:
animated 课程。
.animated { animation-fill-mode: forwards !important; -webkit-animation-fill-mode: forwards !important; } 添加到css。小提琴:jsfiddle.net/nn18co76/5