0

Didn't work plz help

<!DOCTYPE html> <html> <head> <title>bd flag</title> </head> <body> <svg width="2000" height="2000"> <circle cx="50" cy="25" r"40" fill="red"> <animate attributeName="x" from="0" to="300" dur="3s" fill="freeze" repeatCount="2" /> </circle> <rect width="200" height="100" x="0" y="0" fill="green" > <animate attributeName="x" from="0" to="300" dur="3s" fill="freeze" repeatCount="2" /> </rect> </svg> </body> </html>

23rd Dec 2019, 2:26 PM
shaon
7 Respuestas
0
In the <circle> tag at the attribute r is a equal (=) missing
23rd Dec 2019, 4:39 PM
Nico Ruder
Nico Ruder - avatar
0
im done. But animate code Didn't work
23rd Dec 2019, 8:06 PM
shaon
0
Change the x's to the attribute you want to change like the radius r write attributeName="r" or look here https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/attributeName
24th Dec 2019, 12:23 AM
Nico Ruder
Nico Ruder - avatar
0
I changed it but the circle doesnt go right direction with rectangle. It work like zoom out. I want the circle go with rectangle same direction.
24th Dec 2019, 5:29 AM
shaon
0
Oh ok Here: <svg width="2000" height="2000"> <circle cx="50" cy="25" r="40" fill="red"> <animate attributeName="cx" from="0" to="300" dur="3s" fill="freeze" repeatCount="2" /> </circle> <rect width="200" height="100" x="0" y="0" fill="green" > <animate attributeName="x" from="0" to="300" dur="3s" fill="freeze" repeatCount="2" /> </rect> </svg> You had to change attributeName in circle to cx
24th Dec 2019, 2:02 PM
Nico Ruder
Nico Ruder - avatar
0
Thank you very much
24th Dec 2019, 5:32 PM
shaon
0
No problem
24th Dec 2019, 6:37 PM
Nico Ruder
Nico Ruder - avatar