AnimationEvent
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.
AnimationEvent
介面表示提供與動畫相關訊息的事件。
建構子
AnimationEvent()
-
使用給定的參數建立一個
AnimationEvent
事件。
實例屬性
也繼承自其父 Event
的屬性。
AnimationEvent.animationName
Read only-
包含產生動畫的
animation-name
值的字串。 AnimationEvent.elapsedTime
Read only-
一個
float
,表示此事件觸發時動畫已執行的時間(以秒為單位),不包括動畫暫停的時間。對於animationstart
事件,elapsedTime
為0.0
,除非animation-delay
有負值,此時事件將以(-1 * delay)
的elapsedTime
值觸發。 AnimationEvent.pseudoElement
Read only-
一個以
'::'
開頭的字串,包含動畫運行的偽元素名稱。如果動畫不是運行在偽元素上,而是運行在元素上,則為空字串:''
。
實例方法
繼承自其父 Event
的方法。
規範
Specification |
---|
CSS Animations Level 1 # interface-animationevent |