view

The view SVG element specifies a view.

Syntax

Attributes

preserveAspectRatio

Specifies whether or not to force uniform scaling.

Value
<align> <meetOrSlice>?
Default
xMidYMid meet

viewBox

Specifies a rectangle in user space.

A list of four numbers: min-x, min-y, width, and height that should be mapped to the bounds of the SVG viewport established by the given element, taking into account the preserveAspectRatio attribute. The presence of the viewBox attribute results in a transformation being applied to the viewport coordinate system.

Value
[ <min-x>,? <min-y>,? <width>,? <height> ]
Default
(none)

Examples

preserveAspectRatio

<align>

<meetOrSlice>

viewBox

<height>

<min-x>

<min-y>

<width>

Internal

a

External

World Wide Web Consortium (W3C)

Home Menu