CSS3 animation-play-state 屬性
實(shí)例
暫停動(dòng)畫(huà):
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 屬性。
注釋?zhuān)?/span>Internet Explorer 9 以及更早的版本不支持 animation-play-state 屬性。
定義和用法
animation-play-state 屬性規(guī)定動(dòng)畫(huà)正在運(yùn)行還是暫停。
注釋?zhuān)?/span>您可以在 JavaScript 中使用該屬性,這樣就能在播放過(guò)程中暫停動(dòng)畫(huà)。
默認(rèn)值: | running |
---|---|
繼承性: | no |
版本: | CSS3 |
JavaScript 語(yǔ)法: | object.style.animationPlayState="paused" |
語(yǔ)法
animation-play-state: paused|running;
值 | 描述 | 測(cè)試 |
---|---|---|
paused | 規(guī)定動(dòng)畫(huà)已暫停。 | 測(cè)試 |
running | 規(guī)定動(dòng)畫(huà)正在播放。 | 測(cè)試 |
相關(guān)頁(yè)面
CSS3 教程:CSS3 動(dòng)畫(huà)