スタイルanimationDirectionプロパティ
例
<div>要素のanimationDirectionプロパティを変更する:
document.getElementById("myDIV").style.animationDirection = "reverse";
定義と使用法
AnimationDirectionプロパティは、アニメーションを交互のサイクルで逆再生するかどうかを設定または返します。
注:アニメーションが1回だけ再生されるように設定されている場合、このプロパティは効果がありません。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後にMozが続くと、プレフィックスで機能した最初のバージョンが指定されます。
Property | |||||
---|---|---|---|---|---|
animationDirection | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
構文
AnimationDirectionプロパティを返します。
object.style.animationDirection
AnimationDirectionプロパティを設定します。
object.style.animationDirection = "normal|reverse|alternate|alternate-reverse|initial|inherit"
プロパティ値
Value | Description |
---|---|
normal | Default value. The animation should be played as normal |
reverse | The animation should play in reverse direction |
alternate | The animation will be played as normal every odd time (1,3,5,etc..) and in reverse direction every even time (2,4,6,etc...) |
alternate-reverse | The animation will be played in reverse direction every odd time (1,3,5,etc..) and in a normal direction every even time (2,4,6,etc...) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 正常 |
---|---|
戻り値: | 要素のアニメーション方向プロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:animation-directionプロパティ