viewBox
« SVG Attribute reference home
viewBox
属性は、特定の container 要素に合わせるためのグラフィックス stretch のセットを指定できます。
The value of the viewBox
attribute is a list of four numbers min-x
, min-y
, width
and height
, separated by whitespace and/or a comma, which specify a rectangle in user space which should be mapped to the bounds of the viewport established by the given element, taking into account attribute preserveAspectRatio (en-US)
.
Negative values for width
or height
are not permitted and a value of zero disables rendering of the element.
Usage context
Categories | None |
---|---|
Value | See above |
Animatable | Yes |
Normative document | SVG 1.1 (2nd Edition) |
例
要素
以下の要素がviewBox
属性を使います。