SVGPatternElement
The SVGPatternElement interface corresponds to the <pattern> element.
Properties
This interface also inherits properties from its parent, SVGElement and implements the ones from SVGFitToViewBox.
-
SVGPatternElement.hrefRead only -
An
SVGAnimatedStringcorresponding to thehreforxlink:hrefattribute of the given<pattern>element. -
SVGPatternElement.patternUnitsRead only -
An
SVGAnimatedEnumerationcorresponding to thepatternUnitsattribute of the given<pattern>element. Takes one of the constants defined inSVGUnitTypes. -
SVGPatternElement.patternContentUnitsRead only -
An
SVGAnimatedEnumerationcorresponding to thepatternContentUnitsattribute of the given<pattern>element. Takes one of the constants defined inSVGUnitTypes. -
SVGPatternElement.patternTransformRead only -
An
SVGAnimatedTransformListcorresponding to thepatternTransformattribute of the given<pattern>element. -
SVGPatternElement.xRead only -
An
SVGAnimatedEnumerationcorresponding to thexattribute of the given<pattern>element. -
SVGPatternElement.yRead only -
An
SVGAnimatedEnumerationcorresponding to theyattribute of the given<pattern>element. -
SVGPatternElement.widthRead only -
An
SVGAnimatedEnumerationcorresponding to thewidthattribute of the given<pattern>element. -
SVGPatternElement.heightRead only -
An
SVGAnimatedEnumerationcorresponding to theheightattribute of the given<pattern>element.
Methods
This interface doesn't implement any specific methods, but inherits methods from its parent interface, SVGElement and implements the ones from SVGFitToViewBox.
Specifications
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
SVGPatternElement |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
height |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
href |
1 |
12 |
3 |
9 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
patternContentUnits |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
patternTransform |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
patternUnits |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
preserveAspectRatio |
1 |
12 |
3 |
9 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
viewBox |
1 |
12 |
3 |
9 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
width |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
x |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
y |
1 |
12 |
3 |
9 |
≤12.1 |
3 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement