animate.css基本使用
来源:互联网 发布:什么网络兼职靠谱 编辑:程序博客网 时间:2024/05/21 19:41
1、首先引入animate css文件
<head> <link rel="stylesheet" href="animate.min.css"></head>
2、给指定的元素加上指定的动画样式名
<div class="animated bounceOutLeft"></div>
这里包括两个class名,第一个是基本的,必须添加的样式名,任何想实现的元素都得添加这个。第二个是指定的动画样式名。
3、如果说想给某个元素动态添加动画样式,可以通过jquery来实现:
$('#yourElement').addClass('animated bounceOutLeft');
animate.css 的默认设置也许有些时候并不是我们想要的,所以你可以重新设置,比如:
4、当动画效果执行完成后还可以通过以下代码添加事件
$('#yourElement').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', doSomething);
你也可以通过 JavaScript 或 jQuery 给元素添加这些 class,比如:
$(function(){ $('#jq22').addClass('animated bounce');});
有些动画效果最后会让元素不可见,比如淡出、向左滑动等等,可能你又需要将 class 删除,比如:
$(function(){ $('#jq22').addClass('animated bounce'); setTimeout(function(){ $('#jq22').removeClass('bounce'); }, 1000);});
animate.css 的默认设置也许有些时候并不是我们想要的,所以你可以重新设置,比如:
#jq22{ animate-duration: 2s; //动画持续时间 animate-delay: 1s; //动画延迟时间 animate-iteration-count: 2; //动画执行次数}
阅读全文
0 0
- animate.css基本使用
- animate.css的基本使用
- vue2使用animate css
- animate.css的使用
- animate.css的使用
- animate.css的使用
- animate.css的使用,css特效
- Animate.css
- Animate.css
- animate.css
- animate.css
- animate.css
- Animate.css动画库的使用
- Vue自定义动画和animate.css使用
- vue和animate.css怎么结合使用
- 三六、vue中使用animate.css
- vue 和animate.css 的动画使用
- Animate.css_动画学习之Animate.css的使用与解析
- 【设计模式】策略模式(Strategy Pattern)
- [Java面试七]Mybatis总结以及在面试中的一些问题
- springMVC学习笔记-要点概述
- mysql常见问题集锦
- H5总结(day01)
- animate.css基本使用
- Java 形参与实参
- 接口
- bionic linker代码分析(1)
- linux文件目录分析之/etc目录
- Spark 重分区coalesce和repartition,合并小文件
- 笔记:linux检测软件包是否安装方法
- Java与JSON之间的相互转换-3
- android 使用RecyclerView ViewType创建不同的item