共计 506 个字符,预计需要花费 2 分钟才能阅读完成。
css animation-duration 使用说明
animation-duration 属性定义动画完成一个周期需要多少秒或毫秒。
默认值: | 0 |
---|---|
继承: | no |
版本: | CSS3 |
JavaScript 语法: | object object.style.animationDuration="3s" |
css animation-duration 语法
animation-duration: time;
值 | 说明 |
---|---|
time | 指定动画播放完成花费的时间。默认值为 0,意味着没有动画效果。 |
css animation-duration 浏览器支持
Internet Explorer 10, Firefox, 和 Opera 支持 animation-duration 属性.
Safari 和 Chrome 通过私有属性 -WebKit-animation 支持。
注意:Internet Explorer 9 及更早 IE 版本不支持 animation-name 属性。
css animation-duration 实例
设置动画在两秒内完成:
animation-duration:2s;
-webkit-animation-duration:2s; /* Safari and Chrome */
正文完