+ 3

Why we using height and width within svg as well as in rect. What is the difference??

28th Oct 2016, 4:14 AM
fathima shahanaz
fathima shahanaz - avatar
2 Antworten
+ 2
The <svg> element establishes a viewport for the content of the SVG canvas. By specifying a width and height to the <svg>, you restrict the content inside it to the bounds of the viewport that is defined by the x, y, width, and height attributes. Rect is an object inside the canvas so you must give it an attribute.
2nd Nov 2016, 12:12 AM
Chris Coder
Chris Coder - avatar
+ 2
Yeah now i got it. Svg height and width is like viewport in computer graphics.
27th Nov 2016, 5:52 PM
fathima shahanaz
fathima shahanaz - avatar