天天看點

CSS3 animation-play-state 屬性

暫停動畫:

animation-play-state:paused;

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

表格中的數字表示支援該屬性的第一個浏覽器版本号。

緊跟在 -webkit-, -ms- 或 -moz- 前的數字為支援該字首屬性的第一個浏覽器版本号。

屬性

animation-play-state

43.0

4.0 -webkit-

10.0

16.0

5.0 -moz-

9.0

30.0

15.0 -webkit-

12.0 -o-

animation--play-state屬性指定動畫是否正在運作或已暫停。

<b>注意:</b>在JavaScript中使用此屬性在一個周期中暫停動畫。

預設值:

running

繼承:

no

版本:

CSS3

JavaScript 文法:

object object.style.animationPlayState="paused"

animation-play-state: paused|running;

描述

測試

paused

指定暫停動畫

測試 »

指定正在運作的動畫

CSS3 教程: CSS3 動畫