1 Star 0 Fork 4

白白 / Animate.css

forked from ltpower / Animate.css 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

#Animate.css

Animate.css 一款强大的预设css3动画库

兼容性

IE9及以上

用法

1 首先在head中引入下载的animate.css文件

<link rel="stylesheet" href="css/animate.css">

2 然后你想要哪个元素进行动画,就给那个元素添加上animated类 以及特定的动画类名,animated是每个要进行动画的元素都必须要添加的类。

<div class="animated bounce"></div>

这里包括两个class名,第一个是基本的,必须添加的样式名,任何想实现的元素都得添加这个。第二个是指定的动画样式名。

3 如果说想给某个元素动态添加动画样式,可以通过jquery来实现:

$("#yourElement").on("click",function(){
    $("this").addClass('animated bounce');
})

4 当动画效果执行完成后添加事件

 $('#yourElement').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){  
    $("body").css("background","black")
 });

5 有些动画效果最后会让元素不可见,比如淡出、向左滑动等等,可能你又需要将 class 删除,比如:

setTimeout(function(){
    $('#yourElement').removeClass('bounce');
    }, 1000);

6 至于动画的配置参数,比如动画持续时间,动画的执行次数等等,你可以在你的的元素上自行定义,覆盖掉animate.css里面所定义的就行了。

#yourElement{
   
      -webkit-animation-duration: 3s;   /* 动画持续时间*/
      -webkit-animation-delay: 1s;   /* 动画延迟时间*/
      -webkit-animation-iteration-count: 2;    /*动画执行次数*/
       animation-duration: 3s;  
       animation-delay: 1s;   
       animation-iteration-count: 2;   
       width: 100px; 
       height: 100px; 
       background: red; 
}

注意这些属性还要记得加上各浏览器的前缀。

githut地址

可以根据实际项目查看各种动画demo参考

空文件

简介

Animate.css 一款强大的预设css3动画库 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/1101367326/Animate.css.git
git@gitee.com:1101367326/Animate.css.git
1101367326
Animate.css
Animate.css
master

搜索帮助