from
该属性表示将在动画期间修改的属性的初始值。当与to属性一起使用时,动画会将修改后的属性从from
值更改为to
值。
用法上下文
Categories | Animation value attribute |
---|---|
Value | <value> |
Animatable | No |
Normative document | SVG 1.1 (2nd Edition) |
该属性的确切值类型取决于将被动画的属性的值。
实例
此示例使用100
作为该from
属性的值,使形状动画从宽度100开始。
<?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="width"
????? from="100" to="150"
????? dur="3s"
????? fill="freeze"/>
? </rect>
?? ?
</svg>
适用元素
以下元素可以使用该from
属性
<animate>
<animatecolor>
<animatemotion>
<animatetransform>
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com