这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
transitionrun
event is fired when a
CSS transition
is first created, i.e. before any
transition-delay
has begun.
| 冒泡 | Yes |
|---|---|
| 可取消 | No |
| 接口 |
TransitionEvent
|
| 事件处理程序特性 |
ontransitionrun
|
The original target for this event is the
元素
that had the transition applied. You can listen for this event on the
Document
interface to handle it in the capture or bubbling phases. For full details on this event please see the page on
HTMLElement: transitionrun
.
This code adds a listener to the
transitionrun
event:
document.addEventListener('transitionrun', () => {
console.log('Transition is running but hasn't necessarily started transitioning yet');
});
一样,但使用
ontransitionrun
property instead of
addEventListener()
:
document.ontransitionrun = () => {
console.log('Transition started running');
};
See a live example of this event.
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Transitions
The definition of 'transitionrun' in that specification. |
工作草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
transitionrun
event
|
Chrome No | Edge No | Firefox 53 | IE ? | Opera ? |
Safari
13.1
|
WebView Android No | Chrome Android No | Firefox Android 53 | Opera Android ? |
Safari iOS
13.4
|
Samsung Internet Android No |
完整支持
不支持
兼容性未知
用户必须明确启用此特征。
GlobalEventHandlers.ontransitionrun
event handler
TransitionEvent
interface
transition
,
transition-delay
,
transition-duration
,
transition-property
,
transition-timing-function
transitionend
,
transitionstart
,
transitioncancel
HTMLElement
目标:
transitionrun
Window
目标:
transitionrun
Document
alinkColor
all
anchors
applets
bgColor
body
characterSet
childElementCount
children
compatMode
contentType
currentScript
defaultView
designMode
dir
doctype
documentElement
documentURI
documentURIObject
domain
domConfig
嵌入
fgColor
firstElementChild
forms
fullscreen
fullscreenEnabled
head
height
hidden
图像
实现
lastElementChild
lastModified
lastStyleSheetSet
linkColor
链接
location
mozSyntheticDocument
onabort
onafterscriptexecute
onanimationcancel
onanimationend
onanimationiteration
onauxclick
onbeforescriptexecute
onblur
oncancel
oncanplay
oncanplaythrough
onchange
onclick
onclose
oncontextmenu
oncuechange
ondblclick
ondurationchange
onended
onerror
onfocus
onformdata
onfullscreenchange
onfullscreenerror
ongotpointercapture
oninput
oninvalid
onkeydown
onkeypress
onkeyup
onload
onloadeddata
onloadedmetadata
onloadend
onloadstart
onlostpointercapture
onmousedown
onmouseenter
onmouseleave
onmousemove
onmouseout
onmouseover
onmouseup
onoffline
ononline
onpause
onplay
onplaying
onpointercancel
onpointerdown
onpointerenter
onpointerleave
onpointermove
onpointerout
onpointerover
onpointerup
onreset
onresize
onscroll
onselect
onselectionchange
onselectstart
onsubmit
ontouchcancel
ontouchstart
ontransitioncancel
ontransitionend
onvisibilitychange
onwheel
origin
plugins
popupNode
preferredStyleSheetSet
readyState
referrer
rootElement
脚本
scrollingElement
selectedStyleSheetSet
styleSheetSets
timeline
title
tooltipNode
URL
visibilityState
vlinkColor
width
xmlEncoding
xmlVersion
adoptNode()
append()
caretRangeFromPoint()
clear()
close()
createAttribute()
createCDATASection()
createComment()
createDocumentFragment()
createElement()
createElementNS()
createEntityReference()
createEvent()
createExpression()
createExpression()
createNodeIterator()
createNSResolver()
createNSResolver()
createProcessingInstruction()
createRange()
createTextNode()
createTouch()
createTouchList()
createTreeWalker()
enableStyleSheetsForSet()
evaluate()
evaluate()
execCommand()
exitFullscreen()
exitPointerLock()
getAnimations()
getBoxObjectFor()
getElementById()
getElementsByClassName()
getElementsByName()
getElementsByTagName()
getElementsByTagNameNS()
hasFocus()
hasStorageAccess()
importNode()
mozSetImageElement()
open()
prepend()
queryCommandEnabled()
queryCommandSupported()
querySelector()
querySelector()
querySelectorAll()
querySelectorAll()
registerElement()
releaseCapture()
replaceChildren()
requestStorageAccess()
write()
writeln()
animationcancel
animationend
animationiteration
animationstart
copy
cut
DOMContentLoaded
drag
dragend
dragenter
dragexit
dragleave
dragover
dragstart
drop
fullscreenchange
fullscreenerror
gotpointercapture
keydown
keypress
keyup
lostpointercapture
paste
pointercancel
pointerdown
pointerenter
pointerleave
pointerlockchange
pointerlockerror
pointermove
pointerout
pointerover
pointerup
readystatechange
scroll
selectionchange
selectstart
touchcancel
touchend
touchmove
touchstart
transitioncancel
transitionend
transitionrun
transitionstart
visibilitychange
wheel