MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

« 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,