Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. Web API
  3. Element
  4. animationstart

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

animationstart

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2019年12月.

animationstart 事件会在 CSS 动画开始时触发。如果有animation-delay 延时,事件会在延迟时效过后立即触发。为负数的延时时长会致使事件被触发时事件的elapsedTime 属性值等于该时长的绝对值(并且,相应地,动画将直接播放该时长绝对值之后的动画)。

基本信息

规格

CSS Animations

接口

AnimationEvent

是否冒泡

事件可取消

目标

Document, Element

默认行为

属性表

属性类型描述
target只读EventTarget事件来源(DOM 顶层目标)。
type只读DOMString事件类型
bubbles只读boolean事件是否正常冒泡?
cancelable只读boolean可否取消该事件?
animationName只读DOMString与该动画相关的 CSS 属性值。
elapsedTime只读Float动画运行时长,单位为秒,与直到该事件被触发的时间相一致,不包括任何动画暂停时的时长。此值应为 0 除非animation-delay 是一个负值,这种情况下此值为 (-1 *animation-delay),并且动画将直接从此值后的序列开始播放。

规范

Specification
CSS Animations Level 1
# eventdef-globaleventhandlers-animationstart

相关事件

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp