aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/globaleventhandlers/onanimationend/index.html
blob: b1b7b071d9ee5c40ca0e236645eeee3a400f7737 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
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>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Microsoft Edge</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
    {{CompatVersionUnknown}} (unprefixed)</td>
   <td>{{CompatGeckoDesktop(51)}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Android Webview</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
   <th>Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
    {{CompatVersionUnknown}} (unprefixed)</td>
   <td>{{CompatGeckoMobile(51)}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}<br>
    {{CompatVersionUnknown}} (unprefixed)</td>
  </tr>
 </tbody>
</table>
</div>

<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>