SVG Animations using SMIL (4)
SVG Animations using SMIL (4)
SVG Animations using SMIL (4)
Now we know how to animate a ball.
Let's have something else.
Let's have something else.
Line
Let's draw a line.
Why not look at the codes first?
<svg
width="300px" height="300px" viewBox="0 0 300 300"
class="mt-5 generic-svg-container border border-solid border-gray-300"
>
<path
stroke="#d22"
stroke-width="5"
fill="transparent"
d="M 30 100 L 270 100 L 150 250"
/>
</svg>
So, we have d="M 30 100 L 270 100 L 150 250".
What does it mean?
What does it mean?
M 30 100
means that you are moving
to x=30 y=100.
L 270 100
means you are drawing a line
to x=270 y=100.
L 150 250
means you are drawing a line
to x=150 y=250.
This one is pretty intuitive also, huh?
NEXT
BACK
Your privacy
By clicking "OK" you agree Astralscience can store cookies on your device and disclose information in accordance with our Cookie Policy.
個人情報の保護について
以下 OK をクリックすることにより、Astralscience があなたの端末にクッキーを保存し、クッキー・ポリシー に従って情報を開示することに同意します。
Quyền riêng tư của bạn
Bằng cách nhấn "OK", bạn đồng ý rằng Astralscience có thể lưu cookie trên thiết bị của bạn và xử lý thông tin theo Chính sách Cookie của chúng tôi.
