attributename

attributename

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

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/attributeName

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部