スタイルanimationDelayプロパティ
例
<div>要素のanimationDelayプロパティの変更:
document.getElementById("myDIV").style.animationDelay = "1s";
定義と使用法
AnimationDelayプロパティは、アニメーションがいつ開始されるかを定義します。
AnimationDelay値は、秒(s)またはミリ秒(ms)で定義されます。
ヒント:負の値を使用できます。-2sを指定すると、アニメーションがすぐに開始されますが、アニメーションの2秒後に開始されます。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後にMozが続くと、プレフィックスで機能した最初のバージョンが指定されます。
Property | |||||
---|---|---|---|---|---|
animationDelay | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
構文
AnimationDelayプロパティを返します。
object.style.animationDelay
AnimationDelayプロパティを設定します。
object.style.animationDelay = "time|initial|inherit"
プロパティ値
Value | Description |
---|---|
time | Optional. Defines the number of seconds or milliseconds to wait before the animation will start. Default value is 0 |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 0 |
---|---|
戻り値: | 要素のanimation-delayプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:animation-delayプロパティ