AnimationEvent: thuộc tính elapsedTime
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.
Thuộc tính chỉ đọc AnimationEvent.elapsedTime là một giá trị float cho biết khoảng thời gian hoạt ảnh đã chạy, tính bằng giây, tại thời điểm sự kiện này được kích hoạt, không bao gồm mọi khoảng thời gian hoạt ảnh bị tạm dừng. Với sự kiện animationstart, elapsedTime là 0.0 trừ khi có giá trị âm cho animation-delay, trong trường hợp đó sự kiện sẽ được kích hoạt với elapsedTime chứa (-1 * delay).
Giá trị
Một float cho biết khoảng thời gian tính bằng giây.
Thông số kỹ thuật
| Specification |
|---|
| CSS Animations Level 1> # dom-animationevent-elapsedtime> |
Tương thích trình duyệt
Xem thêm
- Dùng CSS animations
- Các thuộc tính và at-rule CSS liên quan đến hoạt ảnh:
animation,animation-delay,animation-direction,animation-duration,animation-fill-mode,animation-iteration-count,animation-name,animation-play-state,animation-timing-function,@keyframes. - Giao diện
AnimationEventmà nó thuộc về.