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, elapsedTime0.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

Thông số kỹ thuật
CSS Animations Level 1
# dom-animationevent-elapsedtime

Tương thích trình duyệt

Xem thêm