スタイルanimationIterationCountプロパティ
例
<div>要素のanimationIterationCountプロパティを変更します。
document.getElementById("myDIV").style.animationIterationCount = "infinite";
定義と使用法
AnimationIterationCountプロパティは、アニメーションを再生する回数を設定または返します。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後にMozが続くと、プレフィックスで機能した最初のバージョンが指定されます。
Property | |||||
---|---|---|---|---|---|
animationIterationCount | 43.0 | 79.0 | 16.0 5.0 Moz |
Not supported | 30.0 |
構文
AnimationIterationCountプロパティを返します。
object.style.animationIterationCount
AnimationIterationCountプロパティを設定します。
object.style.animationIterationCount = "number|infinite|initial|inherit"
プロパティ値
Value | Description |
---|---|
number | A number that defines how many times an animation should be played. Default value is 1 |
infinite | Specifies that the animation should be played infinite times (for ever) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 1 |
---|---|
戻り値: | 要素のanimation-iteration-countプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:animation-iteration-countプロパティ