+ 1

svg animation

i change attributeName="y" its move to down but its changed size this the code <svg width="1000" height="250"> <rect width="160" height="160" fill="red"> <animate attributeName="y" from="100" to="300" dur="4s" fill="remove" repeatCount="3"></animate> </rect> </svg>

29th Apr 2017, 1:29 AM
Amer Bashar
1 Resposta
+ 5
It doen't really change the size, but it's cropped by the svg viewbox ( html box container ). To better see what's happen, change the dimensions of the svg tag and/or style it to add a border ( or set a different background color for <svg> and <body> ): <svg width="1000" height="500" style="border:3px solid black; background:yellow;">
29th Apr 2017, 1:47 AM
visph
visph - avatar