Animate.css插件与CSS动画

Animate.css动画效果演示
http://www.jq22.com/yanshi819

引入animate.css的几种方法
官网下载地址:
https://raw.github.com/daneden/animate.css/master/animate.css
或者使用在线cdn:
https://unpkg.com/animate.css@3.5.2/animate.min.css

使用方法

Animate.css是把不同的动画绑定到了不同的类里,所以想要使用哪种动画,只需要把通用类animated和相应的类添加到元素上就行了。

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<link rel="stylesheet" href="https://unpkg.com/animate.css@3.5.2/animate.min.css" type="text/css" />
<style>
.box{height: 100px;width: 100px;background-color: lightblue}
</style>
</head>

<body>
	<div class="box animated bounce"></div><!--直接在元素上添加animated和对应的类名即可-->
</body>
	
</html>

animate.css主要包括Attention(晃动效果)、bounce(弹性缓冲效果)、fade(透明度变化效果)、flip(翻转效果)、rotate(旋转效果)、slide(滑动效果)、zoom(变焦效果)、special(特殊效果)这8类。

通过自定义动画的配置参数,比如动画持续时间,动画的执行次数等等,以达到增强动画效果的目的。

.box{
	height: 100px;
	width: 100px;
	background-color: lightblue;
	animation-duration: 3s;/*动画持续时间*/
	animation-delay: 2s;/*动画执行延迟时间*/
	animation-iteration-count: 3;/*动画执行次数*/
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值