EN
本內容沒有您的語言版本,但有英文版本。

preserveAspectRatio attribute | preserveAspectRatio property

Gets an XML value that indicates whether to force uniform graphic scaling.

Scalable Vector Graphics: Basic Data Types and Interfaces, Section 4.5.28Internet Explorer 9

Syntax

HTML
<element preserveAspectRatio="p" ... >
JavaScript
p = object.preserveAspectRatio

Property values

Type: Object

A value that determines how viewports are scaled, using the following parameters:

Standards information

Remarks

For elements that establish a new viewport, the preserveAspectRatio property applies only when you provide a value for the viewBox attribute on the same element. If you do not specify the viewBox attribute, the preserveAspectRatio attribute is ignored.

For image elements, preserveAspectRatio specifies how images are fitted relative to the reference rectangle. preserveAspectRatio also determines whether the aspect ratio of the image is preserved with respect to the user coordinate system.

See also

SVGImageElement
SVGMarkerElement
SVGPatternElement
SVGSVGElement
SVGSymbolElement
SVGViewElement

 

 

顯示:
© 2014 Microsoft