From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/svguseelement/index.html | 71 ++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 files/zh-cn/web/api/svguseelement/index.html (limited to 'files/zh-cn/web/api/svguseelement') diff --git a/files/zh-cn/web/api/svguseelement/index.html b/files/zh-cn/web/api/svguseelement/index.html new file mode 100644 index 0000000000..aae9a87bab --- /dev/null +++ b/files/zh-cn/web/api/svguseelement/index.html @@ -0,0 +1,71 @@ +--- +title: SVGUseElement +slug: Web/API/SVGUseElement +translation_of: Web/API/SVGUseElement +--- +
{{APIRef("SVG")}}
+ +

SVG使用DOM接口

+ +

SVGUseElement接口对应于{{SVGElement("use")}}元素。

+ +

{{InheritanceDiagram(600, 140)}}

+ +

性质

+ +

此接口还从其父接口{{domxref("SVGGraphicsElement")}} 继承属性,并从{{domxref("SVGURIReference")}}实现属性。

+ +
+
{{domxref("SVGUseElement.x")}} {{ReadOnlyInline}}
+
An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("x")}} attribute of the given element.
+
{{domxref("SVGUseElement.y")}} {{ReadOnlyInline}}
+
An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("y")}} attribute of the given element.
+
{{domxref("SVGUseElement.width")}} {{ReadOnlyInline}}
+
An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("width")}} attribute of the given element.
+
{{domxref("SVGUseElement.height")}} {{ReadOnlyInline}}
+
An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("height")}} attribute of the given element.
+
{{domxref("SVGUseElement.instanceRoot")}} {{ReadOnlyInline}}
+
An {{domxref("SVGElement")}} corresponding to the instance root of the given element, which is a direct child of the elements shadow root. If the element does not have a shadow tree (for example, because its URI is invalid or because it has been disabled by conditional processing), then getting this attribute returns null.
+
{{domxref("SVGUseElement.animatedInstanceRoot")}} {{ReadOnlyInline}}
+
An {{domxref("SVGElement")}} corresponding to the instance root of the given element, which is a direct child of the elements shadow root. If the element does not have a shadow tree (for example, because its URI is invalid or because it has been disabled by conditional processing), then getting this attribute returns null.
+
+ +

Methods

+ +

This interface doesn't implement any specific methods, but inherits methods from its parent interface, {{domxref("SVGGraphicsElement")}} and implements methods from {{domxref("SVGURIReference")}}.

+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("SVG2", "struct.html#InterfaceSVGUseElement", "SVGUseElement")}}{{Spec2("SVG2")}}Redefined the properties instanceRoot and animatedInstanceRoot.
{{SpecName("SVG1.1", "struct.html#InterfaceSVGUseElement", "SVGUseElement")}}{{Spec2("SVG1.1")}}Initial definition
+ +

浏览器兼容性

+ + + +

{{Compat("api.SVGUseElement")}}

+ +

参见

+ + -- cgit v1.2.3-54-g00ecf