CSSanimation -iteration-countプロパティ
例
アニメーションを2回再生します。
div {
animation-iteration-count: 2;
}
以下の「自分で試してみてください」の例をもっと見てください。
定義と使用法
このanimation-iteration-count
プロパティは、アニメーションを再生する回数を指定します。
デフォルト値: | 1 |
---|---|
遺伝性の: | いいえ |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS3 |
JavaScript構文: | object .style.animationIterationCount = "infinite" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後に-webkit-、-moz-、または-o-が続く場合は、プレフィックスを使用して機能した最初のバージョンを指定します。
Property | |||||
---|---|---|---|---|---|
animation-iteration-count | 43.0 4.0 -webkit- |
10.0 | 16.0 5.0 -moz- |
9.0 4.0 -webkit- |
30.0 15.0 -webkit- 12.0 -o- |
CSS構文
animation-iteration-count: number|infinite|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
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 |
その他の例
例
アニメーションを永遠に再生します。
div {
animation-iteration-count: infinite;
}
関連ページ
CSSチュートリアル:CSSアニメーション
HTML DOMリファレンス:animationIterationCountプロパティ