AnimationEventanimationNameプロパティ_
例
アニメーションに関連付けられているアニメーション名を取得します。
var x = document.getElementById("myDIV");
x.addEventListener("animationstart", myStartFunction);
function myStartFunction(event) {
this.innerHTML = "Animation-name is: " + event.animationName;
}
定義と使用法
AnimationNameプロパティは、アニメーションイベントが発生したときに、アニメーションの名前を返します。
アニメーションの名前は、animation- nameCSSプロパティの値です。
このプロパティは読み取り専用です。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
animationName | Yes | 10.0 | 6.0 | Yes | Yes |
構文
event.animationName
技術的な詳細
戻り値: | アニメーションの名前を表す文字列 |
---|
関連ページ
HTML DOMリファレンス:animationstartイベント
HTML DOMリファレンス:animationiterationイベント
HTML DOMリファレンス:animationendイベント
HTML DOMリファレンス:AnimationEventelapsedTimeプロパティ
CSSリファレンス:CSS3アニメーションプロパティ
CSSリファレンス:CSS3animation-nameプロパティ