diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/svg/attribute/attributename | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/svg/attribute/attributename')
-rw-r--r-- | files/zh-cn/web/svg/attribute/attributename/index.html | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/attribute/attributename/index.html b/files/zh-cn/web/svg/attribute/attributename/index.html new file mode 100644 index 0000000000..0f7b065b02 --- /dev/null +++ b/files/zh-cn/web/svg/attribute/attributename/index.html @@ -0,0 +1,64 @@ +--- +title: attributeName +slug: Web/SVG/Attribute/attributeName +tags: + - SVG + - SVG属性 + - 需要兼容性表 +translation_of: Web/SVG/Attribute/attributeName +--- +<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG属性参考主页</a></p> + +<p>该属性标识了在一个动画动作环节中,父元素的需要被改变的属性名。</p> + +<h2 id="用法">用法</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="row">类别</th> + <td>动画属性目标属性</td> + </tr> + <tr> + <th scope="row">值</th> + <td><attributeName></td> + </tr> + <tr> + <th scope="row">可变性</th> + <td>No</td> + </tr> + <tr> + <th scope="row">规范文档</th> + <td><a class="external" href="http://www.w3.org/TR/SVG/animate.html#AttributeNameAttribute" title="http://www.w3.org/TR/SVG/animate.html#AttributeNameAttribute">SVG 1.1 (2nd Edition)</a></td> + </tr> + </tbody> +</table> + +<h2 id="示例">示例</h2> + +<p>下面的示例使用了y作为<code>attributeName</code>,通过改变一个矩形在Y轴上的位置来变动这个矩形。</p> + +<pre class="brush: xml"><?xml version="1.0"?> +<svg width="250" height="250" + viewPort="0 0 250 250" version="1.1" + xmlns="http://www.w3.org/2000/svg"> + <rect x="50" y="50" width="100" height="100"> + <animate attributeType="XML" + attributeName="y" + from="0" to="50" + dur="5s"/> + </rect> +</svg></pre> + +<p> </p> + +<h2 id="元素">元素</h2> + +<p>下列元素可以使用<code>attributeName</code>属性:</p> + +<ul> + <li>{{ SVGElement("animate") }}</li> + <li>{{ SVGElement("animateColor") }}</li> + <li>{{ SVGElement("animateTransform") }}</li> + <li>{{ SVGElement("set") }}</li> +</ul> |