Style animationName プロパティ
例
<div> 要素の animationName プロパティを変更する:
document.getElementById("myDIV").style.animationName="myNEWmove";
試してみる »
定義と使い方
animationName プロパティは、@keyframes アニメーションの名前を設定または返します。
ブラウザサポート
![]()
![]()
![]()
![]()
![]()
Internet Explorer 10、Firefox、Opera は animationName プロパティをサポートしています。
Safari と Chrome は、このプロパティの代替である WebkitAnimationName プロパティをサポートしています。
注意:Internet Explorer 9 以前のバージョンでは animationName プロパティをサポートしていません。
構文
animationName プロパティを返す:
object.style.animationName
animationName プロパティを設定する:
object.style.animationName="none|keyframename|initial|inherit"
プロパティ値
| 值 | 説明 |
|---|---|
| none | デフォルト値。アニメーションがないことを指定します(カスケードからのアニメーションを上書きするために使用できます)。 |
| keyframename | セレクタにバインドするキーフレームの名前を指定します。 |
| initial | このプロパティをデフォルト値に設定します。参照:initial。 |
| inherit | 親要素からこのプロパティを継承します。参照:inherit。 |
技術詳細
| デフォルト値: | none |
|---|---|
| 戻り値: | 要素の animation-name プロパティを表す文字列。 |
| CSS バージョン | CSS3 |
関連記事
CSS リファレンス:animation-name プロパティ
その他の拡張
Style オブジェクト