aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/document/timeline
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/document/timeline
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/document/timeline')
-rw-r--r--files/zh-cn/web/api/document/timeline/index.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/timeline/index.html b/files/zh-cn/web/api/document/timeline/index.html
new file mode 100644
index 0000000000..387e6c7e3b
--- /dev/null
+++ b/files/zh-cn/web/api/document/timeline/index.html
@@ -0,0 +1,66 @@
+---
+title: Document.timeline
+slug: Web/API/Document/timeline
+tags:
+ - API
+ - Animation
+ - Document
+ - Property
+ - 属性
+ - 文档
+translation_of: Web/API/Document/timeline
+---
+<div>{{ SeeCompatTable() }}{{ APIRef("Web Animations") }}</div>
+
+<p>{{domxref("Document")}} 接口的 <code>timeline</code> 只读属性表示当前文档的默认时间轴。 此时间轴是 {{domxref("DocumentTimeline")}} 的一个特殊实例,它会在网页加载时自动创建。</p>
+
+<p>此时间轴对于每个文档(<code>document</code>)来说都是唯一的,并在文档的生命周期中保持不变,包括调用 {{domxref("Document.open()")}}。</p>
+
+<p>该时间线的时间值被计算为与全局时钟的固定偏移,使得零时间对应于{{domxref("PerformanceTiming.navigationStart", "navigationStart")}}时刻加上称为原始时间的带符号的delta 。 在建立导航开始时刻之前,文档时间线是不活动的。</p>
+
+<div class="note">
+<p><strong>注意:</strong>与非活动文档相关联的文档时间轴也被视为是<strong>不活动的</strong>。</p>
+</div>
+
+<h2 id="语法">语法</h2>
+
+<div class="syntaxbox">
+<pre class="brush: js">var pageTimeline = document.timeline;
+var thisMoment = pageTimeline.currentTime;</pre>
+</div>
+
+<h3 id="值">值</h3>
+
+<p>一个 {{domxref("DocumentTimeline")}} 对象。</p>
+
+<h2 id="规则">规则</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">备注</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Web Animations', '#dom-document-timeline', 'document.timeline' )}}</td>
+ <td>{{Spec2('Web Animations')}}</td>
+ <td>Editor's draft.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.Document.timeline")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li><a href="/zh-CN/docs/Web/API/Web_Animations_API">Web Animations API</a></li>
+ <li>{{domxref("AnimationTimeline")}}</li>
+ <li>{{domxref("AnimationTimeline.currentTime")}}</li>
+ <li>{{domxref("DocumentTimeline")}}</li>
+</ul>