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 ์†์„ฑ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

See also