示例
html
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="100" height="100">
<animate
attributeType="XML"
attributeName="width"
fill="freeze"
from="100"
to="150"
dur="3s" />
</rect>
</svg>
animate, animateMotion, animateTransform
对于 <animate>、<animateMotion> 和 <animateTransform>,to 指定动画的结束值。
| 值 | <value> |
|---|---|
| 默认值 | None |
| 可动画的 | 否 |
此属性的确切值类型取决于将要进行动画处理的属性的值。
如果通过 values 属性定义了一系列值,则会忽略 to 属性。
set
对于 <set> 元素,to 指定元素持续期间属性的值。
| 值 | <value> |
|---|---|
| 默认值 | None |
| 可动画的 | 否 |
此属性的确切值类型取决于将要进行动画处理的属性的值。
规范
| 规范 |
|---|
| SVG 动画级别 2 # SetElementToAttribute |
| SVG 动画级别 2 # ToAttribute |