0

animated circle does not move

what is wrong with my code? why my circle does not move at all? <svg width="1000" hight="250"> <circle cx="45" cy="45" r="20" fill="green"> <animate attributeName="x" from="0" to="200" dur="5" fill="freeze" repeatCount="indefinite" /> </circle> </svg>

31st Jul 2017, 9:35 AM
Dariush Shiri
Dariush Shiri - avatar
7 Respuestas
+ 10
Both work!
2nd Aug 2017, 10:23 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 9
<svg width="1000" hight="250"> <circle cx="45" cy="45" r="20" fill="green"> <animate attributeName="cx" from="0" to="200" dur="5" fill="freeze" repeatCount="indefinite" /> </circle> </svg> <!-- attributeName should be cx not x... -->
31st Jul 2017, 10:07 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
Common error is value of cx-attribute. You both wrote: <circle cx="45" ...... Why "45", if you want the circle move from "0" to "200"? Correct way is the next: <circle cx="" cy="45" r="20" fill="green"> <animate attributeName="cx" from="0" to="200" dur="5" fill="freeze" repeatCount="indefinite" /> </circle>
1st Aug 2017, 9:03 PM
benka
benka - avatar
+ 1
doesn't work still
31st Jul 2017, 10:16 AM
Dariush Shiri
Dariush Shiri - avatar
+ 1
Change dur to 5s and not 5.
10th Sep 2017, 5:12 AM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
0
thx but yours doesn't work as well, does it? by work I mean making move the circle
2nd Aug 2017, 10:21 AM
Dariush Shiri
Dariush Shiri - avatar
0
yes it does, but manually. thanx you all anyway
2nd Aug 2017, 12:07 PM
Dariush Shiri
Dariush Shiri - avatar