animation的属性值

在逆战班学习的第4周
animation的属性值:

1、animation-name
检索或设置对象所应用的动画名称
必须与规则@keyframes配合使用,
eg:@keyframes mymove{} animation-name:mymove;
2、animation-duration
检索或设置对象动画的持续时间
说明:animation-duration:3s; 动画完成使用的时间为3s
3、animation-timing-function
检索或设置对象动画的过渡类型
属性值
linear:线性过渡。等同于贝塞尔曲线(0.0, 0.0, 1.0, 1.0)
ease:平滑过渡。等同于贝塞尔曲线(0.25, 0.1, 0.25, 1.0)
ease-in:由慢到快。等同于贝塞尔曲线(0.42, 0, 1.0, 1.0)
ease-out:由快到慢。等同于贝塞尔曲线(0, 0, 0.58, 1.0)
ease-in-out:由慢到快再到慢。等同于贝塞尔曲线(0.42, 0, 0.58, 1.0)

  • step-start:马上跳到动画每一结束桢的状态
    4、animation-delay
    检索或设置对象动画延迟的时间
    说明:animation-delay:0.5s; 动画开始前延迟的时间为0.5s)
    5、animation-iteration-count
    检索或设置对象动画的循环次数
    属性值
    animation-iteration-count: infinite | number;
    infinite:无限循环
    number: 循环的次数
    6、animation-direction
    检索或设置对象动画在循环中是否反向运动
    属性值
    normal:正常方向
    reverse:反方向运行
    alternate:动画先正常运行再反方向运行,并持续交替运行
    alternate-reverse:动画先反运行再正方向运行,并持续交替运行
    7、animation-play-state
    检索或设置对象动画的状态
    属性值
    animation-play-state:running | paused;
    running:运动
    paused: 暂停
    animation-play-state:paused; 当鼠标经过时动画停止,鼠标移开动画继续执行
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值