blob: 41666637e44cc522948cec0843b0fe0c91dbc0ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
---
title: window.mozAnimationStartTime
slug: Web/API/Window/mozAnimationStartTIme
translation_of: Web/API/Window/mozAnimationStartTime
---
<p>{{ ApiRef() }}</p>
<p>{{ gecko_minversion_header("2.0") }}{{ non-standard_header() }}</p>
<h3 id="Summary" name="Summary">概述</h3>
<p>Returns the time, in milliseconds since the epoch, at which animations started now should be considered to have started. This value should be used instead of, for example, <code><a href="/zh-cn/JavaScript/Reference/Global_Objects/Date/now" title="zh-cn/JavaScript/Reference/Global Objects/Date/now">Date.now()</a></code>, because this value will be the same for all animations started in this window during this refresh interval, allowing them to remain in sync with one another.</p>
<p>This also allows JavaScript-based animations to remain synchronized with CSS transitions and SMIL animations triggered during the same refresh interval.</p>
<h3 id="Syntax" name="Syntax">语法</h3>
<pre class="eval"><em>time</em> = window.mozAnimationStartTime;
</pre>
<h3 id="Specification" name="Specification">规范</h3>
<p>不属于任何规范.</p>
<h3 id="相关链接">相关链接</h3>
<ul>
<li>{{ domxref("window.requestAnimationFrame()") }}</li>
<li>{{ domxref("window.onmozbeforepaint") }}</li>
</ul>
<p>{{ languages( { "en":"en/DOM/window.mozAnimationStartTime" } ) }}</p>
|