SVGFitToViewBox

SVG fit to view box interface

The SVGFitToViewBox interface is used to reflect the viewBox and preserveAspectRatio attributes, and is mixed in to other interfaces for elements that support these two attributes.

Interface overview

Also implement None
Methods None
Properties
Normative document SVG 1.1 (2nd Edition)

Properties

Name Type Description
preserveAspectRatio SVGAnimatedPreserveAspectRatio Corresponds to attribute preserveAspectRatio on the given element.
viewBox SVGAnimatedRect Corresponds to attribute viewBox on the given element.

Methods

The SVGFitToViewBox interface does not provide any specific methods.

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
SVGFitToViewBox Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support
Full support
No support
No support
Compatibility unknown
Compatibility unknown