viewBox
ยซ SVG Attribute reference home
viewBox
์์ฑ์ ํน์ํ container element ์ fit ํ๊ธฐ ์ํ ์ฃผ์ด์ง graphics stretch ์ set ์ ๋ช
์ํ๋ค.
viewBox
์์ฑ์ ๊ฐ์ whitespace and/or a comma ๋ก ๋๋์ด์ง min-x
, min-y
, width,
height
4๊ฐ์ง number list ์ด๋ค. ์ด๋ ์ฃผ์ด์ง element ์ ์ํด ์ค์ ๋ viewport ์ bounds ์ ๋งตํ๋์ด์ผ ํ๋ user space ๋ด์ rectangle ์ ๋ช
์ํ๋ฉฐ, preserveAspectRatio (en-US)
์์ฑ๊ณผ ๊ด๊ณ๊ฐ ์๋ค.
์์๋ก ์ด๋ฃจ์ด์ง width ๋๋ height ๋ ํ์ฉ๋์ง ์์ผ๋ฉฐ zero ๊ฐ์ element rendering ์ด ๋ถ๊ฐํ๋ค.
Usage context
Categories | None |
---|---|
Value | See above |
Animatable | Yes |
Normative document | SVG 1.1 (2nd Edition) |
Example
Elements
์๋ element ๋ค์ viewBox
์์ฑ์ ์ฌ์ฉํ ์ ์๋ค.