AnimationEvent
AnimationEvent インターフェイスは、アニメーションに関する情報を提供するイベントを表します。
コンストラクター
AnimationEvent()-
指定された引数で
AnimationEventイベントを生成します。
プロパティ
親である Event から継承されるプロパティもあります。
AnimationEvent.animationName読取専用-
文字列で、このアニメーションを生成した
animation-nameの値が入ります。 AnimationEvent.elapsedTime読取専用-
float値で、アニメーションが実行された時間の長さを秒単位で表し、イベントが発生したときは、アニメーションが停止していた時間は除外されます。animationstartイベントでは、elapsedTimeは、ふつう0.0となりますが、animation-delayが負の値であった場合は例外で、この場合はイベントはelapsedTimeに(-1 * delay)が入った状態でイベントが発生します。 AnimationEvent.pseudoElement読取専用-
文字列で、
'::'で始まる、アニメーションが実行される擬似要素の名前が入ります。このアニメーションが擬似要素ではなく要素で実行されている場合は、空文字列''になります。
メソッド
親である Event からメソッドを継承しています。
仕様書
| Specification |
|---|
| CSS Animations Level 1 # interface-animationevent |
ブラウザーの互換性
BCD tables only load in the browser
関連情報
- CSS アニメーションの使用
- アニメーションに関する CSS プロパティとアットルール:
animation,animation-delay,animation-direction,animation-duration,animation-fill-mode,animation-iteration-count,animation-name,animation-play-state,animation-timing-function,@keyframes.