这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
getComputedTiming()
方法在
AnimationEffect
interface returns the calculated timing properties for this animation effect.
Although many of the attributes of the returned object are common to the
EffectTiming
contained in the object returned by the
AnimationEffect.getTiming()
method, the values returned by this object differ in the following ways:
duration
EffectTiming.duration
is the string
auto
, this attribute will return
0
.
fill
auto
value is replaced with the appropriate
EffectTiming.fill
值。
These values are comparable to the computed styles of an Element returned using
window.getComputedStyle(elem)
.
var currentTimeValues = animation.getComputedTiming();
None.
A
ComputedEffectTiming
dictionary object, which contains the following properties:
KeyframeEffect
is associated with an
动画
). (Also includes
EffectTiming.endDelay
in that calculation.)
KeyframeEffect
is not associated with an
动画
, its value is
null
.
0
and
1
。返回
null
if the animation is not running or its
KeyframeEffect
isn't associated with an
动画
.
0
. Returns
null
if the animation is not running or its
KeyframeEffect
isn't associated with an
动画
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Web 动画
The definition of 'AnimationEffect.getComputedTiming()' in that specification. |
工作草案 | 编者草案。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
getComputedTiming
|
Chrome 75 | Edge 79 | Firefox 63 | IE No | Opera 62 | Safari 13.1 | WebView Android 75 | Chrome Android 75 | Firefox Android 63 | Opera Android 54 | Safari iOS 13.4 | Samsung Internet Android 11.0 |
完整支持
不支持
AnimationEffect
getComputedTiming()
getTiming()
updateTiming()