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
|
---
title: animate
slug: Web/SVG/Element/animate
tags:
- Animação
- Elemento
- SVG
translation_of: Web/SVG/Element/animate
---
<div>{{SVGRef}}</div>
<p>O elemento SVG <code><strong><animate></strong></code> fornece uma maneira de animar um atributo de um elemento ao longo do tempo.</p>
<div id="Exemple">
<div class="hidden">
<pre class="brush: css">html,body,svg { height:100%; margin:0; padding:0; }</pre>
</div>
<pre class="brush: html; highlight[2]"><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
<rect width="10" height="10">
<animate attributeName="rx" values="0;5;0" dur="10s" repeatCount="indefinite" />
</rect>
</svg></pre>
<p>{{EmbedLiveSample('Exemple', 150, '100%')}}</p>
</div>
<h2 id="Attributes">Attributes</h2>
<h3 id="Animation_Attributes">Animation Attributes</h3>
<dl>
<dt><a href="/docs/Web/SVG/Attribute#Animation_Timing_Attributes">Animation timing attributes</a></dt>
<dd><small>{{SVGAttr("begin")}}, {{SVGAttr("dur")}}, {{SVGAttr("end")}}, {{SVGAttr("min")}}, {{SVGAttr("max")}}, {{SVGAttr("restart")}}, {{SVGAttr("repeatCount")}}, {{SVGAttr("repeatDur")}}, {{SVGAttr("fill")}}</small></dd>
<dt><a href="/docs/Web/SVG/Attribute#Animation_Value_Attributes">Animation value attributes</a></dt>
<dd><small>{{SVGAttr("calcMode")}}, {{SVGAttr("values")}}, {{SVGAttr("keyTimes")}}, {{SVGAttr("keySplines")}}, {{SVGAttr("from")}}, {{SVGAttr("to")}}, {{SVGAttr("by")}}</small></dd>
<dt><a href="/docs/Web/SVG/Attribute#Animation_Attributes">Other Animation attributes</a></dt>
<dd><small>Most notably: {{SVGAttr("attributeName")}}, {{SVGAttr("additive")}}, {{SVGAttr("accumulate")}}</small></dd>
<dt><a href="/docs/Web/SVG/Attribute/Events#Animation_Event_Attributes">Animation event attributes</a></dt>
<dd><small>Most notably: {{SVGAttr("onbegin")}}, {{SVGAttr("onend")}}, {{SVGAttr("onrepeat")}}</small></dd>
</dl>
<h3 id="Global_attributes">Global attributes</h3>
<dl>
<dt><a href="/docs/Web/SVG/Attribute/Core">Core Attributes</a></dt>
<dd><small>Most notably: {{SVGAttr('id')}}</small></dd>
<dt><a href="/docs/Web/SVG/Attribute/Styling">Styling Attributes</a></dt>
<dd><small>{{SVGAttr('class')}}, {{SVGAttr('style')}}</small></dd>
<dt>Event Attributes</dt>
<dd><small><a href="/docs/Web/SVG/Attribute/Events#Global_Event_Attributes">Global event attributes</a>, <a href="/docs/Web/SVG/Attribute/Events#Document_Element_Event_Attributes">Document element event attributes</a></small></dd>
</dl>
<h2 id="Usage_notes">Usage notes</h2>
<p>This element implements the {{domxref("SVGAnimateElement")}} interface.</p>
<h2 id="Accessibility_concerns">Accessibility concerns</h2>
<p>Blinking and flashing animation can be problematic for people with cognitive concerns such as Attention Deficit Hyperactivity Disorder (ADHD). Additionally, certain kinds of motion can be a trigger for Vestibular disorders, epilepsy, and migraine and Scotopic sensitivity.</p>
<p>Consider providing a mechanism for pausing or disabling animation, as well as using the <a href="/en-US/docs/Web/CSS/@media/prefers-reduced-motion">Reduced Motion Media Query</a> to create a complimentary experience for users who have expressed a preference for no animated experiences.</p>
<ul>
<li><a href="https://alistapart.com/article/designing-safer-web-animation-for-motion-sensitivity">Designing Safer Web Animation For Motion Sensitivity · An A List Apart Article </a></li>
<li><a href="https://css-tricks.com/introduction-reduced-motion-media-query/">An Introduction to the Reduced Motion Media Query | CSS-Tricks</a></li>
<li><a href="https://webkit.org/blog/7551/responsive-design-for-motion/">Responsive Design for Motion | WebKit</a></li>
<li><a href="/en-US/docs/Web/Accessibility/Understanding_WCAG/Operable#Guideline_2.2_%E2%80%94_Enough_Time_Provide_users_enough_time_to_read_and_use_content">MDN Understanding WCAG, Guideline 2.2 explanations</a></li>
<li><a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-pause.html">Understanding Success Criterion 2.2.2 | W3C Understanding WCAG 2.0</a></li>
</ul>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName("SVG Animations 2", "#AnimateElement", "<animate>")}}</td>
<td>{{Spec2("SVG Animations 2")}}</td>
<td>No change</td>
</tr>
<tr>
<td>{{SpecName("SVG1.1", "animate.html#AnimateElement", "<animate>")}}</td>
<td>{{Spec2("SVG1.1")}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Compatibilidade com navegadores</h2>
<div>
<p>{{Compat("svg.elements.animate")}}</p>
</div>
|