to
该属性指示在动画期间将被修改的属性的最终值。属性的值将在from属性值和此值之间变化。默认情况下,更改将是线性的。
当此属性与<set>
元素一起使用时,它指定元素的持续时间内的属性值<set>
。
用法说明
分类 | 动画值属性 |
---|---|
值 |
<value> |
动画 | 没有 |
规范性文件 | SVG 1.1(第2版)SVG 1.1(第2版):设置元素 |
该属性的确切值类型取决于将被动画的属性的值。
例子
此示例使用150
该to
属性的值,因此该形状将生成150的高度。
<?xml version="1.0"?>
<svg width="200" height="200"
? viewPort="0 0 200 200" version="1.1"
? xmlns="http://www.w3.org/2000/svg">
?? ?
? <rect x="10" y="10" width="100" height="100">
??? <animate attributeType="XML"
????? attributeName="height"
????? from="100" to="150"
????? dur="3s"
????? fill="freeze"/>
? </rect>
?? ?
</svg>
元素
The following elements can use the to
attribute
- Animation elements ?
? 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com