TransitionEvent - Web APIs 编辑

Experimental

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The TransitionEvent interface represents events providing information related to transitions.

Constructor

TransitionEvent()
Creates a TransitionEvent event with the given parameters.

Properties

Also inherits properties from its parent Event.

TransitionEvent.propertyName Read only
Is a DOMString containing the name CSS property associated with the transition.
TransitionEvent.elapsedTime Read only
Is a float giving the amount of time the transition has been running, in seconds, when this event fired. This value is not affected by the transition-delay property.
TransitionEvent.pseudoElement Read only
Is a DOMString, starting with ::, containing the name of the pseudo-element the animation runs on. If the transition doesn't run on a pseudo-element but on the element, an empty string: ''.

Types of TransitionEvent

transitioncancel
An Event fired when a CSS transition has been cancelled.
transitionend
An Event fired when a CSS transition has finished playing.
transitionrun
An Event fired when a CSS transition is created, when it is added to a set of running transitions, though not nessarilty started
transitionstart
An Event fired when a CSS transition has started transitioning.

Methods

Also inherits properties from its parent Event.

TransitionEvent.initTransitionEvent() This API has not been standardized.This deprecated API should no longer be used, but will probably still work.
Initializes a TransitionEvent created using the deprecated Document.createEvent("TransitionEvent") method.

Specifications

SpecificationStatusComment
CSS Transitions
The definition of 'TransitionEvent' in that specification.
Working DraftInitial definition.

Browser compatibility

BCD tables only load in the browser

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:70 次

字数:7063

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文