transition animation

本文详细介绍了CSS中过渡(transition)和动画(animation)的基本用法。过渡效果使用property、duration、timing-function和delay等属性定义,而动画则通过指定名称、持续时间、速度曲线、延迟、播放次数及方向来实现。此外,还提供了使用@keyframes定义动画过程的具体实例。

trantion:proterty duration timing-function delay ;

    过渡的css属性 过渡时间 过渡曲线 延迟

 

 

animation : name duration timing-function delay iteration-count direction;

      动画名   动画所花费的时间,以秒或毫秒计   动画的速度曲线    延迟      播放次数 是否轮流方向播放动画

 

 

动画写法

 

@keyframes myfirst
{
from {background: red;}
to {background: yellow;}
}

@-moz-keyframes myfirst /* Firefox */
{
from {background: red;}
to {background: yellow;}
}

@-webkit-keyframes myfirst /* Safari 和 Chrome */
{
from {background: red;}
to {background: yellow;}
}

@-o-keyframes myfirst /* Opera */
{
from {background: red;}
to {background: yellow;}
}

转载于:https://www.cnblogs.com/xiaomingBlog/p/7806116.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值