aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/events/animationend/index.html
blob: cb701ac392ba847fec8933a45177ab5c0ee10205 (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
---
title: animationend
slug: Web/Events/animationend
tags:
  - Animation
  - AnimationEvent
  - CSS Animations
  - CSS3 Animations
  - Event
  - Reference
  - animationend
translation_of: Web/API/HTMLElement/animationend_event
---
<p><code>animationend</code> 事件会在一个 CSS 动画完成时触发(不包括完成前就已终止的情况,例如元素变得不可见或者动画从元素中移除)。</p>

<h2 id="常规信息">常规信息</h2>

<dl>
 <dt style="float: left; text-align: right; width: 120px;">规范</dt>
 <dd style="margin: 0 0 0 120px;">{{SpecName("CSS3 Animations")}}</dd>
 <dt style="float: left; text-align: right; width: 120px;">接口</dt>
 <dd style="margin: 0 0 0 120px;">{{domxref("AnimationEvent")}}</dd>
 <dt style="float: left; text-align: right; width: 120px;">是否冒泡</dt>
 <dd style="margin: 0 0 0 120px;"></dd>
 <dt style="float: left; text-align: right; width: 120px;">事件可取消</dt>
 <dd style="margin: 0 0 0 120px;"></dd>
 <dt style="float: left; text-align: right; width: 120px;">目标</dt>
 <dd style="margin: 0 0 0 120px;">{{domxref("Document")}}, {{domxref("Element")}}, {{domxref("Window")}}</dd>
 <dt style="float: left; text-align: right; width: 120px;">默认行为</dt>
 <dd style="margin: 0 0 0 120px;"></dd>
</dl>

<h2 id="属性表">属性表</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">属性</th>
   <th scope="col">类型</th>
   <th scope="col">描述</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>target</code> {{ReadOnlyInline}}</td>
   <td>{{domxref("EventTarget")}}</td>
   <td>事件目标(DOM 顶层目标)。</td>
  </tr>
  <tr>
   <td><code>type</code> {{ReadOnlyInline}}</td>
   <td>{{domxref("DOMString")}}</td>
   <td>事件类型</td>
  </tr>
  <tr>
   <td><code>bubbles</code> {{ReadOnlyInline}}</td>
   <td><code>boolean</code></td>
   <td>事件是否正常冒泡?</td>
  </tr>
  <tr>
   <td><code>cancelable</code> {{ReadOnlyInline}}</td>
   <td><code>boolean</code></td>
   <td>可否取消该事件?</td>
  </tr>
  <tr>
   <td><code>animationName</code> {{ReadOnlyInline}}</td>
   <td>{{domxref("DOMString")}}</td>
   <td>与该动画相关的 CSS 属性值。</td>
  </tr>
  <tr>
   <td><code>elapsedTime</code> {{ReadOnlyInline}}</td>
   <td><code>Float</code></td>
   <td>动画运行时长,单位为秒,与直到该事件被触发的时间相一致,不包括任何动画暂停时的时长。应等于 {{cssxref("animation-iteration-count")}} 乘以 {{cssxref("animation-duration")}} 的积,动画总活动的时长。</td>
  </tr>
 </tbody>
</table>

<h2 id="相关事件">相关事件</h2>

<ul>
 <li>{{Event("animationstart")}}</li>
 <li>{{Event("animationiteration")}}</li>
 <li>{{Event("animationcancel")}}</li>
</ul>

<h2 id="参见">参见</h2>

<ul>
 <li><a href="/en-US/docs/Web/CSS/CSS_Animations">CSS Animations</a></li>
 <li><a href="/en-US/docs/CSS/Using_CSS_animations" title="/en-US/docs/CSS/Using_CSS_animations">Using CSS Animations</a></li>
 <li>{{domxref("AnimationEvent")}}</li>
 <li>{{domxref("GlobalEventHandlers.onanimationstart")}}</li>
</ul>