+ 1
How to make animations in HTML
I made a moving rectangle that goes on and off the screen in an "x" direction, but I am trying to make more moving rectangles but it keeps projecting the same one.
14 ответов
+ 2
Do you want a lot of them? or just a couple?
+ 2
Then I'd recommend using JavaScript. SVG animations aren't good for what you want. While it is possible, it would be easier to do it in JavaScript.
+ 1
Can you post your code.
+ 1
Kyle I was just making this code. Check it out, I did tres animations with different movements.
https://code.sololearn.com/W0EeZkTTlM92/?ref=app
If your problem is not solved yet, please tell us more details and share your code (if possible).
+ 1
Kyle I don't think so, values are only replacing the "from" and "to" statements.
For example, you can see that one of them has
attributeName="x" values="0;300;0"
So, it means that it will start from 0, and will move to 300, and then it will go back to 0 in the "x" axis (horizontally).
^^That's something you can't do with the "from" and "to" statements.
+ 1
Okay thank you!
0
What's the idea you have in mind?
0
Pixelated Rain drops, maybe
0
Alright, so you will have to use the <animate> tag for every single rain drop.
0
Yes I know
0
But my problem is, it only lets me make one animation per document
0
Mario,I never learned values in my HTML course, which I see you have. Could that be my problem?
0
Hey guys thanks for helping? I wrote a quick code demonstrating my issues.
https://code.sololearn.com/WoUAQWs7CS41/?ref=app
I made an animation going downwards and the exact Sams one but with the x axis. Only one showed.
Also I would like to have both of them with the ‘y’ axis but spread apart so it looks like raindrops. How would I do that?
0
A lot of them😁