animate
animateName
animateName用于标识父元素需要动态改变的属性名
如下demo即表示动态改变rect元素的rx值
<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
<rect width="8" height="8">
<animate
attributeName="rx"
values="0;5;0"
dur="5s"
repeatCount="indefinite" />
</rect>
</svg>dur
dur即duration,指每一次动画运行时间间隔,可用元素见链接
默认indefinite,可以理解为没有运行时间,即不运行动画
最后更新于
这有帮助吗?