属性 | 默认值 | 属性值及其描述 | ||||||||||||
animation-name | 默认值:none | 规定需要绑定到选择器的 keyframe 名称。
| ||||||||||||
animation-duration | 默认值:0 | 规定完成动画所花费的时间,以秒或毫秒计。
| ||||||||||||
animation-timing-function | 默认值:ease | 规定动画的速度曲线。
| ||||||||||||
animation-delay | 默认值:0 | 规定在动画开始之前的延迟。
| ||||||||||||
animation-iteration-count | 默认值:1 | 规定动画应该播放的次数。
| ||||||||||||
animation-direction | normal|alternate | 规定是否应该轮流反向播放动画。
|
简单例子:
<p className=‘second‘>animation以及transform的使用</p>
.second{
color: #fff;
background-color: #fac;
animation:myfirst 5s infinite;
margin-top:60px;
transform:rotate(9deg);//倾斜(角度)
// transform: translate(10px,20px);//位移(x,y)
// transform: scale(2,1.5);//缩放(宽,高)
}
效果如下:
(颜色在变化)
css3用到知识点小结
原文地址:https://www.cnblogs.com/cherishnow/p/10414418.html