可点击链接查看具体效果:Coco CSS 动画库
只需要在项目文件中包含CSS文件,并在需要添加动画的元素中添加基础类名class coco-ani
,再给其元素中添加具体的动画类名class即可。
示例: <div class="coco-ani fadeIn">
<link href="coco.min.css" rel="stylesheet" type="text/css"/>
<link href="https://ricocc.github.io/coco.min.css" rel="stylesheet" type="text/css"/>
如果想动画效果无限循环的话,给元素添加类名infinite
即可。
- fadeIn
- fadeInBottom
- fadeInLeft
- fadeInRight
- fadeInTop
- fadeOut
- fadeOutBottom
- fadeOutLeft
- fadeOutRight
- fadeOutTop