🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# CSS3 animation-play-state 属性 ## 实例 暂停动画: ``` div { animation-play-state:paused; -webkit-animation-play-state:paused; /* Safari 和 Chrome */ } ``` ## 浏览器支持 | IE | Firefox | Chrome | Safari | Opera | | --- | --- | --- | --- | --- | 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 | 规定动画已暂停。 | [测试](/tiy/c.asp?f=css_animation-play-state) | | running | 规定动画正在播放。 | [测试](/tiy/c.asp?f=css_animation-play-state&p=2) | ## 相关页面 CSS3 教程:[CSS3 动画](/css3/css3_animation.asp "CSS3 动画")