您当前的位置:首页 > 计算机 > 编程开发 > Html+Div+Css(前端)

CSS 动画 animation

时间:12-14来源:作者:点击数:

@keyframes

定义多个关键帧。

@keyframes name{
	from{top:0px;}
	to{top:200px;}
}

属性:1.name 定义动画名称 2.keyframes 定义关键帧的位置

属性值:1.百分值 2.from=0% 3.to=100% 3.styles 定义关键帧的样式属性

animation-name

定义动画的名称。

animation-duration

定义动画的长度。

属性值:

  1. time 默认为 0,无动画效果(单位:s)

animation-timing-function

定义动画的速度曲线。

animation-deley

定义动画的延迟。

animation-iteration-count

定义动画的播放次数(默认为 1)。

animation-derection

定义动画是否循环反向播放。

属性值:

  1. normal 不反向播放(默认)
  2. alternate 循环反向播放

animation-play-state

设置动画的播放状态。

属性值:

  1. paused 暂停
  2. running 播放

animation

在同一个声明中设置动画的属性。

可包括的属性:

  • animation-name
  • animatin-duration
  • animation-timing-function
  • animation-deley
  • animation-iteration-count
  • animation-direction
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐