This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

viewBox

Examples

The following code example demonstrates how to set the viewBox attribute on an SVG element.

<svg width="300px" height="200px" version="1.1"
     viewBox="0 0 1200 800" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">

http://static.webplatform.org/w/public/2/2c/svg-no-viewbox.svg http://static.webplatform.org/w/public/8/8a/svg-viewbox-preserveaspectratio-none.svg http://static.webplatform.org/w/public/a/a6/svg-viewbox-preserveaspectratio-xMaxYMax-meet.svg http://static.webplatform.org/w/public/2/29/svg-viewbox-preserveaspectratio-xMaxYMax-slice.svg

Syntax

Standards information

See also

Related pages

Attributions