AnimationEvent: elapsedTime-Eigenschaft
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.
Die AnimationEvent.elapsedTime
Eigenschaft ist ein schreibgeschütztes float
, das angibt, wie lange die Animation in Sekunden ausgeführt wurde, als dieses Ereignis ausgelöst wurde, ohne die Zeit zu berücksichtigen, in der die Animation pausiert war. Bei einem animationstart
Ereignis ist elapsedTime
0,0
, es sei denn, es gab einen negativen Wert für animation-delay
, in welchem Fall das Ereignis mit elapsedTime
, das (-1 * Verzögerung)
enthält, ausgelöst wird.
Wert
Ein float
, der die Zeit in Sekunden angibt.
Spezifikationen
Specification |
---|
CSS Animations Level 1 # dom-animationevent-elapsedtime |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
elapsedTime |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
Siehe auch
- Verwendung von CSS-Animationen
- Animationsbezogene CSS-Eigenschaften und Regeln:
animation
,animation-delay
,animation-direction
,animation-duration
,animation-fill-mode
,animation-iteration-count
,animation-name
,animation-play-state
,animation-timing-function
,@keyframes
. - Das
AnimationEvent
Interface, zu dem es gehört.