animate.css是一个使用CSS3的animation制作的动画效果的CSS集合,里面预设了很多种常用的动画,且使用非常简单。
github官网:https://daneden.github.io/animate.css/
头部引入:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
npm:
$ npm install animate.css --save
or yarn:
$ yarn add animate.css
使用方式
-
要在您的网站中使用animate.css,只需将样式表放入文档的中,然后将类animated和任何动画名称一起添加到元素中
-
示例
<h1 class="animated infinite bounce delay-2s">Example</h1>
- 类名添加animated
- nfinite为无限循环包含该类
- bounce 为特效名称
- delay为延迟执行时间,delay-2s指延迟两秒执行
特效名称表