animation 属性是六个动画属性的速记属性:
                
            
注释:请始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。
| 默认值: | none 0 ease 0 1 normal | 
|---|---|
| 继承性: | no | 
| 版本: | CSS3 | 
| JavaScript 语法: | object.style.animation="mymove 5s infinite" | 
animation: name duration timing-function delay iteration-count direction;
| 值 | 描述 | 
|---|---|
| animation-name | 规定需要绑定到选择器的 keyframe 名称。。 | 
| animation-duration | 规定完成动画所花费的时间,以秒或毫秒计。 | 
| animation-timing-function | 规定动画的速度曲线。 | 
| animation-delay | 规定在动画开始之前的延迟。 | 
| animation-iteration-count | 规定动画应该播放的次数。 | 
| animation-direction | 规定是否应该轮流反向播放动画。 | 
使用简写属性,将动画与 div 元素绑定:
                
            
| 属性 | |||||
|---|---|---|---|---|---|
| animation | 43.0 4.0 -webkit- | 10.0 | 16.0 5.0 -moz- | 9.0 4.0 -webkit- | 30.0 15.0 -webkit- 12.0 -o- | 
Internet Explorer 10、Firefox 以及 Opera 支持 animation 属性。
Safari 和 Chrome 支持替代的 -webkit-animation 属性。
注释:Internet Explorer 9 以及更早的版本不支持 animation 属性。
CSS3 教程:CSS3 动画
© 2023 mianshi8.net MIT license
 
         CSS 参考手册
CSS 参考手册 CSS 参考手册
CSS 参考手册