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
- Scalable Vector Graphics: Basic Data Types and Interfaces, Section 4.5.28
See also
Related pages
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]