+ 1

Shape animation components- simple question.

<svg width="1000" height="250"> <rect width="150" height="150" fill="orange"> <animate attributeName="x" from="0" to="300" dur="3s" fill="freeze" repeatCount="2"/> </rect> </svg> Anyone care to tell me what fill=freeze means as well as 'attributeName' being 'x'. Does it mean that the rectangle will move 300 units to the right(ie along x-axis/horizon)?

21st Nov 2018, 11:50 AM
Msizi
2 Answers
+ 1
In animation, "fill" lets define what is the final state of the animation! And your concept with "x" is true and you can also use y for y-axis!!
21st Nov 2018, 12:08 PM
AL Araf
AL Araf - avatar
0
Thanks, AL Araf.
21st Nov 2018, 12:19 PM
Msizi