Look at the code below | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 2

Look at the code below

<svg width="1000" height="250"> <rect width="150" height="150" fill="orange"> <animate attributeName="y" from="0" to="300" dur="3s" fill="freeze" repeatCount="2"/> </rect> </svg> here i want to make multiple rectangle along the x-axis and animate it. since i dont know the coordinates of the rectangle i could not make mutiple rectangle. how do i make more than one rectangle. plis do help

9th Sep 2017, 8:00 PM
stephen haokip
stephen haokip - avatar
5 Antworten
+ 7
I literally just guessed by using the context of "y" being animated ... this appears to work: <svg width="1000" height="250"> <rect x="250" width="150" height="150" fill="orange"> <animate attributeName="y" from="0" to="300" dur="3s" fill="freeze" repeatCount="2"/> </rect> <rect x="10" width="150" height="150" fill="red"> <animate attributeName="y" from="0" to="300" dur="3s" fill="freeze" repeatCount="2"/> </rect> </svg>
9th Sep 2017, 8:40 PM
Kirk Schafer
Kirk Schafer - avatar
+ 4
make a new rect tag
9th Sep 2017, 8:07 PM
Joshua
Joshua - avatar
+ 4
You need CSS I see.
10th Sep 2017, 1:29 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
even if i do... the rectangle sits on top of the other
9th Sep 2017, 8:08 PM
stephen haokip
stephen haokip - avatar
0
thank you kirk
10th Sep 2017, 7:25 AM
stephen haokip
stephen haokip - avatar