现在的位置: 首页 > 综合 > 正文

CSS3 animation-play-state 属性

2013年11月22日 ⁄ 综合 ⁄ 共 553字 ⁄ 字号 评论关闭

CSS3 animation-play-state 属性

CSS 参考手册

实例

暂停动画:

div
{
animation-play-state:paused;
-webkit-animation-play-state:paused; /* Safari 和 Chrome */
}

亲自试一试

浏览器支持

Internet Explorer 10、Firefox 以及 Opera 支持 animation-play-state 属性。

Safari 和 Chrome 支持替代的 -webkit-animation-play-state 属性。

注释:Internet Explorer 9 以及更早的版本不支持 animation-play-state 属性。

定义和用法

animation-play-state 属性规定动画正在运行还是暂停。

注释:您可以在 JavaScript 中使用该属性,这样就能在播放过程中暂停动画。

默认值: running
继承性: no
版本: CSS3
JavaScript 语法: object.style.animationPlayState="paused"

语法

animation-play-state: paused|running;
描述 测试
paused 规定动画已暂停。 测试
running 规定动画正在播放。 测试

相关页面

CSS3 教程:CSS3 动画

CSS 参考手册

抱歉!评论已关闭.