0

My animation doesn't work, why?

<! - - My code - - > <svg width ="100" height="50"> <circle cx ="10" cy="10" r="10"> <animate attributeName="x" from="0" to="300" dur="3s" fill="remove" repeatCount="2"/> </circle> </svg> <!-- --Example of sololearn--> <svg width="1000" height="150"> <rect width="150" height="150" fill="orange"> <animate attributeName="x" from="0" to="300" dur="3s" fill="freeze" repeatCount="2"/> </rect> </svg> <!--My html animation doesn't work, why? It's written as the example of Sololear The code you can see in my profile --> https://code.sololearn.com/WNtwwjm512PV/?ref=app

24th Apr 2021, 3:06 AM
Erick BM
Erick BM - avatar
2 Réponses
+ 2
For circle attributeName should be cx not only x.
24th Apr 2021, 3:07 AM
TOLUENE
TOLUENE - avatar
0
Oh... Thanks!
24th Apr 2021, 3:10 AM
Erick BM
Erick BM - avatar