aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/element/animatetransform/index.html
blob: 4526c79b862eef941844d1700d4c3f0c4fd0841c (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
---
title: animateTransform
slug: Web/SVG/Element/animateTransform
tags:
  - SVG
  - SVG动画
  - 元素
  - 需要兼容性表
translation_of: Web/SVG/Element/animateTransform
---
<div>{{SVGRef}}</div>

<p><code>animateTransform</code>元素变动了目标元素上的一个变形属性,从而允许动画控制转换、缩放、旋转或斜切。</p>

<h2 id="用法">用法</h2>

<p>{{svginfo}}</p>

<h2 id="示例">示例</h2>

<pre class="brush: html">&lt;?xml version="1.0"?&gt;
&lt;svg width="120" height="120"  viewBox="0 0 120 120"
     xmlns="http://www.w3.org/2000/svg" version="1.1"
     xmlns:xlink="http://www.w3.org/1999/xlink" &gt;

    &lt;polygon points="60,30 90,90 30,90"&gt;
        &lt;animateTransform attributeName="transform"
                          attributeType="XML"
                          type="rotate"
                          from="0 60 70"
                          to="360 60 70"
                          dur="10s"
                          repeatCount="indefinite"/&gt;
    &lt;/polygon&gt;
&lt;/svg&gt;</pre>

<p><strong>示例输出</strong></p>

<p>{{ EmbedLiveSample('Example','120','120') }}</p>

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

<h3 id="全局属性">全局属性</h3>

<ul>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Conditional processing attributes" title="en-US/docs/Web/SVG/Attribute#Conditional processing attributes">条件处理属性</a> »</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Core attributes" title="en-US/docs/Web/SVG/Attribute#Core attributes">核心属性</a> »</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Animation event attributes" title="en-US/docs/Web/SVG/Attribute#Animation event attributes">动画事件属性</a> »</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Xlink attributes" title="en-US/docs/Web/SVG/Attribute#Xlink attributes">Xlink属性</a> »</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Animation attribute target attributes" title="en-US/docs/Web/SVG/Attribute#Animation attribute target attributes">动画属性目标属性</a> »</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Animation timing attributes" title="en-US/docs/Web/SVG/Attribute#Animation timing attributes">动画定时属性</a> »</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Animation value attributes" title="en-US/docs/Web/SVG/Attribute#Animation value attributes">动画值属性</a> »</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Animation addition attributes" title="en-US/docs/Web/SVG/Attribute#Animation addition attributes">A动画累加属性</a> »</li>
 <li>{{ SVGAttr("externalResourcesRequired") }}</li>
</ul>

<h3 id="专有属性">专有属性</h3>

<ul>
 <li>{{ SVGAttr("by") }}</li>
 <li>{{ SVGAttr("from") }}</li>
 <li>{{ SVGAttr("to") }}</li>
 <li>{{ SVGAttr("type") }}</li>
</ul>

<h2 id="DOM_Interface">DOM Interface</h2>

<p>该元素实现了<code><a href="/en-US/docs/DOM/SVGAnimateTransformElement" title="en/DOM/SVGAnimateTransformElement">SVGAnimateTransformElement</a></code>接口。</p>