I tried to animate circle instead of rectangle.. I just make minor changes in the given example but it's not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I tried to animate circle instead of rectangle.. I just make minor changes in the given example but it's not working

plz share your knowledge if u know how to animate a circle

17th Jan 2017, 1:50 PM
shazia fatima siddiqui
shazia fatima siddiqui - avatar
8 Answers
+ 3
Post your code, or a link to it ( and the example you're talking about ) to allow us to study them with you, if you want more tartgeted advises/help ;)
17th Jan 2017, 4:59 PM
visph
visph - avatar
+ 3
The same, with <circle> instead of <rect>: <svg width="1000" height="250"> <circle r="100" cx="0" cy="125" fill="orange"> <animate attributeName="cx" from="0" to="300" dur="3s" fill="freeze" repeatCount="2"/> </circle> </svg> My first mistake was to change name of opening tag, but not at ending tag </rect>... And I gone look at reference to get the right attributs of <circle> element. Do you have thought to adapt the attributes of <animate> child? The position did'nt have the same coordinates name for <rect> ;)
17th Jan 2017, 5:18 PM
visph
visph - avatar
0
owh..tysm sir
17th Jan 2017, 1:54 PM
shazia fatima siddiqui
shazia fatima siddiqui - avatar
0
I'll check it out..ty
17th Jan 2017, 4:52 PM
shazia fatima siddiqui
shazia fatima siddiqui - avatar
0
<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> here's that code of rectangle animation
17th Jan 2017, 5:06 PM
shazia fatima siddiqui
shazia fatima siddiqui - avatar
0
it's working but if I replace rectangle attributes with circle ..it will not animate
17th Jan 2017, 5:13 PM
shazia fatima siddiqui
shazia fatima siddiqui - avatar
0
ooowwhh I changed tags and all attributes but didn't change the animate's attribute I mean I had to put cx in place of c ..thanku sir :)
17th Jan 2017, 5:24 PM
shazia fatima siddiqui
shazia fatima siddiqui - avatar