🗓️ 15022025 2253
📎
svg_foundations
current_color
viewbox
- Allows for responsive design
- Definition
- The
x
coordinate of the top-left point of the visible region; - The
y
coordinate of the top-left point of the visible region; - The width of the visible region in user units, and;
- The height of the visible region in user units.
- The
aspect ratio
- The viewbox determines the SVG's default aspect ratio
- When the SVG's height and width don't match the viewbox's aspect ratio, the browser will scale the viewbox as necessary to fit it into the available space
- The
preserveAspectRatio
attribute can be used to change this behavior