aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/svguseelement/index.html
blob: 40fdd258d112f5a06c84d810a0405f7940463729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
title: SVGUseElement
slug: Web/API/SVGUseElement
translation_of: Web/API/SVGUseElement
---
<div>{{APIRef("SVG")}}</div>

<h2 id="SVG使用DOM接口"><font><font>SVG使用DOM接口</font></font></h2>

<p><font><font></font></font><strong><code>SVGUseElement</code></strong><font><font>接口对应于</font></font>{{SVGElement("use")}}<font><font>元素。</font></font></p>

<p>{{InheritanceDiagram(600, 140)}}</p>

<h2 id="性质"><font><font>性质</font></font></h2>

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

<dl>
 <dt>{{domxref("SVGUseElement.x")}} {{ReadOnlyInline}}</dt>
 <dd>An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("x")}} attribute of the given element.</dd>
 <dt>{{domxref("SVGUseElement.y")}} {{ReadOnlyInline}}</dt>
 <dd>An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("y")}} attribute of the given element.</dd>
 <dt>{{domxref("SVGUseElement.width")}} {{ReadOnlyInline}}</dt>
 <dd>An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("width")}} attribute of the given element.</dd>
 <dt>{{domxref("SVGUseElement.height")}} {{ReadOnlyInline}}</dt>
 <dd>An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("height")}} attribute of the given element.</dd>
 <dt>{{domxref("SVGUseElement.instanceRoot")}} {{ReadOnlyInline}}</dt>
 <dd>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 <code>null</code>.</dd>
 <dt>{{domxref("SVGUseElement.animatedInstanceRoot")}} {{ReadOnlyInline}}</dt>
 <dd>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 <code>null</code>.</dd>
</dl>

<h2 id="Methods">Methods</h2>

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

<h2 id="规范">规范</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("SVG2", "struct.html#InterfaceSVGUseElement", "SVGUseElement")}}</td>
   <td>{{Spec2("SVG2")}}</td>
   <td>Redefined the properties <code>instanceRoot</code> and <code>animatedInstanceRoot</code>.</td>
  </tr>
  <tr>
   <td>{{SpecName("SVG1.1", "struct.html#InterfaceSVGUseElement", "SVGUseElement")}}</td>
   <td>{{Spec2("SVG1.1")}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性"><font><font>浏览器兼容性</font></font></h2>



<p>{{Compat("api.SVGUseElement")}}</p>

<h2 id="参见"><font><font>参见</font></font></h2>

<ul>
 <li>{{SVGElement("use")}}</li>
</ul>