HTML5: Code for SVG to animate in both x and y simultaneously | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

HTML5: Code for SVG to animate in both x and y simultaneously

Hello all, if you could assist with the following amendment for line 3 if possible?: 1. <svg width="1000" height="250"> 2. <rect width="150" height="150" fill="orange"> 3. <animate attributeName="x" from="0" to="300" 4. dur="3s" fill="freeze" repeatCount="2"/> 5. </rect> 6.</svg> My aim is to animate in a diagonal direction; combination of x and y. Any ideas? Thanks in advance

22nd Jul 2018, 11:58 AM
BBIIIGGGG
BBIIIGGGG - avatar
3 Answers
+ 1
add another animate tag for y 😉
22nd Jul 2018, 1:19 PM
KrOW
KrOW - avatar
+ 2
KrOW thanks 👍🏼👌🏼
22nd Jul 2018, 1:50 PM
BBIIIGGGG
BBIIIGGGG - avatar
0
👍
22nd Jul 2018, 1:51 PM
KrOW
KrOW - avatar