SVGPatternElement

Baseline 已廣泛支援

此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 ⁨2015 年 7 月⁩以來,各瀏覽器均已提供此特性。

SVGPatternElement 介面對應於 <pattern> 元素。

EventTarget Node Element SVGElement SVGPatternElement

例項屬性

此介面還繼承了其父介面 SVGElement 的屬性。

SVGPatternElement.href 只讀

一個 SVGAnimatedString,對應於給定 <pattern> 元素的 hrefxlink:href 已棄用 屬性。

SVGPatternElement.patternUnits 只讀

一個 SVGAnimatedEnumeration,對應於給定 <pattern> 元素的 patternUnits 屬性。接受 SVGUnitTypes 中定義的常量之一。

SVGPatternElement.patternContentUnits 只讀

一個 SVGAnimatedEnumeration,對應於給定 <pattern> 元素的 patternContentUnits 屬性。接受 SVGUnitTypes 中定義的常量之一。

SVGPatternElement.patternTransform 只讀

一個 SVGAnimatedTransformList,對應於給定 <pattern> 元素的 patternTransform 屬性。

SVGPatternElement.viewBox 只讀

一個 SVGAnimatedRect,對應於給定 <pattern> 元素的 viewBox 屬性。

SVGPatternElement.preserveAspectRatio 只讀

一個 SVGAnimatedPreserveAspectRatio,對應於給定 <pattern> 元素的 preserveAspectRatio 屬性。

SVGPatternElement.x 只讀

一個 SVGAnimatedEnumeration,對應於給定 <pattern> 元素的 x 屬性。

SVGPatternElement.y 只讀

一個 SVGAnimatedEnumeration,對應於給定 <pattern> 元素的 y 屬性。

SVGPatternElement.width 只讀

一個 SVGAnimatedEnumeration,對應於給定 <pattern> 元素的 width 屬性。

SVGPatternElement.height 只讀

一個 SVGAnimatedEnumeration,對應於給定 <pattern> 元素的 height 屬性。

例項方法

此介面不實現任何特定方法,但繼承了其父介面 SVGElement 的方法。

規範

規範
Scalable Vector Graphics (SVG) 2
# InterfaceSVGPatternElement

瀏覽器相容性