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