aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/attribute/max/index.html
blob: 1c21348b7e434ad46d78da715dee04ea2e8fbeed (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
---
title: max
slug: Web/SVG/Attribute/max
translation_of: Web/SVG/Attribute/max
---
<div>{{SVGRef}}</div>

<p>The <strong><code>max</code></strong> attribute specifies the maximum value of the active animation duration.</p>

<p>Five elements are using this attribute: {{SVGElement("animate")}}, {{SVGElement("animateColor")}}, {{SVGElement("animateMotion")}}, {{SVGElement("animateTransform")}}, and {{SVGElement("set")}}</p>

<div id="topExample">
<div class="hidden">
<pre class="brush: css">html, body, svg {
  height: 100%;
}</pre>
</div>

<pre class="brush: html; highlight[3,5]">&lt;svg viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"&gt;
  &lt;circle cx="60" cy="10" r="10"&gt;
    &lt;animate attributeName="cx" dur="4s" max="6s" repeatCount="indefinite"
        values="60 ; 110 ; 60 ; 10 ; 60" keyTimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/&gt;
    &lt;animate attributeName="cy" dur="4s" max="6s" repeatCount="indefinite"
        values="10 ; 60 ; 110 ; 60 ; 10" keyTimes="0 ; 0.25 ; 0.5 ; 0.75 ; 1"/&gt;
  &lt;/circle&gt;
&lt;/svg&gt;</pre>

<p>{{EmbedLiveSample("topExample", "200", "200")}}</p>
</div>

<h2 id="Usage_notes">Usage notes</h2>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Value</th>
   <td><code><a href="/en-US/docs/Web/SVG/Content_type#Clock-value">&lt;clock-value&gt;</a></code></td>
  </tr>
  <tr>
   <th scope="row">Default value</th>
   <td><em>None</em></td>
  </tr>
  <tr>
   <th scope="row">Animatable</th>
   <td>No</td>
  </tr>
 </tbody>
</table>

<dl>
 <dt><code>&lt;clock-value&gt;</code></dt>
 <dd>
 <p>Specifies the length of the maximum value of the active duration, measured in local time. The value must be greater than 0.</p>
 </dd>
</dl>

<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", "#MaxAttribute", "max")}}</td>
   <td>{{Spec2("SVG Animations 2")}}</td>
   <td>No change</td>
  </tr>
  <tr>
   <td>{{SpecName("SVG1.1", "animate.html#MaxAttribute", "max")}}</td>
   <td>{{Spec2("SVG1.1")}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("svg.elements.animate.max")}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{SVGAttr("min")}}</li>
</ul>