blob: 121ad37fb5c87d2ee32e89e80ea70d04516eb01e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
---
title: GlobalEventHandler.onanimationend
slug: Web/API/GlobalEventHandlers/onanimationend
translation_of: Web/API/GlobalEventHandlers/onanimationend
---
<h2 id="概述">概述</h2>
<p>事件处理程序。 当CSS动画到达其活动期的结束时发送此事件</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox">var <em>animEndHandler</em> = <em>target</em>.onanimationend;
<em>target</em>.onanimationend = <em>事件处理函数</em>
</pre>
<h3 id="值">值</h3>
<p>当<em><code>target</code></em>(HTML元素, document 或者 window)的CSS动画已经开始,{{event("animationend")}}事件会触发同时<code>事件处理函数</code>会被调用。<code>事件处理函数</code>会接收到唯一的参数:{{domxref("AnimationEvent")}} 描述发生的事件。</p>
<h2 id="例子">例子</h2>
<p>{{Page("/en-US/docs/Web/API/GlobalEventHandlers/onanimationstart", "Example")}}</p>
<h2 id="规范">规范</h2>
<table class="spectable standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('CSS3 Animations','#eventdef-animationevent-animationend','onanimationend')}}</td>
<td>{{Spec2('CSS3 Animations')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
{{Compat("api.GlobalEventHandlers.onanimationend")}}
<h2 id="参考">参考</h2>
<ul>
<li>The {{event("animationend")}} event this event handler is triggered by</li>
<li>{{domxref("AnimationEvent")}}</li>
<li>The {{event("animationstart")}} event</li>
</ul>
|