+ 1

What is the purpse of <svg width="2000" height="2000">

<svg width="2000" height="2000"> <circle cx="80" cy="80" r="50" fill="green" /> </svg>

14th Jul 2020, 3:44 PM
Muhammad Kashif
4 Respuestas
+ 7
It sets the "coordinate system" that is used in the svg. Here, it means that your x values can range from 0 to 2000 and so can your y values.
14th Jul 2020, 3:45 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
Svg is the container for svg elements. Just like you use html as a container for html elements Similarly it creates a viewport where your svg elements can come into action
14th Jul 2020, 3:46 PM
Ayush Kumar
Ayush Kumar - avatar
+ 1
It sets the size of your viewport, 👑 Prometheus 🇸🇬 is right in some extend, but the fact that It has a height of 2000 pixels doesn't always mean your range is going to be from 0 to 2000, usually while working with SVG you use viewBox attribute to keep the range to a small number without changing the size of your viewport, thats because its easier to work with a range of 100 pixels width and 100 pixels height than a range of 2000 pixels width and 2000 pixels height.
14th Jul 2020, 11:12 PM
Karak10
Karak10 - avatar
+ 1
If you want to understand better SVG you can check my notes, just write karak10notes.c1.biz
14th Jul 2020, 11:15 PM
Karak10
Karak10 - avatar