Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

attributeName

此文件需要技術審查。看看您能幫什麼忙。

我們的志工尚未將此文章翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!

« SVG Attribute reference home

This attribute indicates the name of the attribute in the parent element that is going to be changed during an animation. 

Usage context

Categories Animation attribute target attribute
Value <attributeName>
Animatable No
Normative document SVG 1.1 (2nd Edition)

Example

This example uses y as the attributeName to animate a rectangle shape by changing its position on the Y axis.

<?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>

 

Elements

The following elements can use the attributeName attribute

文件標籤與貢獻者

 此頁面的貢獻者: SueSmith, Jeremie, sebmozilla
 最近更新: SueSmith,