https://www.dowebok.com/demo/2014/98/
css3动画库,预设了抖动(shake)、闪烁(flash)、弹跳(bounce)、旋转(rotateIn|rotateOut)、翻转(flip)、淡入淡出(fadeIn|fadeOut)等动画效果。
使用方法:
1、第一步. 引入animate.css文件
<link rel="stylesheet" href="css/animate.min.css">
第二步. 给指定的元素加上指定的动画样式名
animation-name定义动画的效果名称
animation-duration定义动画持续的时间
animation-delay 定义动画延迟的时间
animation-iteration-count: 定义动画重复的次数
animation-timing-function 定义动画的速度
animation:动画效果 执行时间 延迟时间 执行次数 速度曲线;
选择自己想要的动画效果,然后复制粘贴
第一个animated是必须添加的样式名,第二个是指定的动画样式名。
<divclass="animated fadeInUp"></div>
2、加统一的类名animated,然后选择自己想要的动画效果,然后复制粘贴
//1.直接加自己选择的类名
<h3class="animated tada">tada</h3>
<pclass="animated rubberBand">rubberBand</p>
<divclass="animated shake">shake</div>
三、css3中过渡和动画的区别?
区别:语法、触发、执行次数、复杂度
相同点 : 都是随着时间改变元素的属性值。
不同点:
1、过渡动画是需要触发条件的(hover事件或click事件等),只能完成简单的动画
2、帧动画不需要任何的触发条件,可以完成复杂轨迹的动画