aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/attribute/width
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/svg/attribute/width
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/svg/attribute/width')
-rw-r--r--files/zh-cn/web/svg/attribute/width/index.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/attribute/width/index.html b/files/zh-cn/web/svg/attribute/width/index.html
new file mode 100644
index 0000000000..93a4c1f58b
--- /dev/null
+++ b/files/zh-cn/web/svg/attribute/width/index.html
@@ -0,0 +1,62 @@
+---
+title: width
+slug: Web/SVG/Attribute/width
+tags:
+ - SVG
+ - SVG属性
+ - 需要兼容性表
+translation_of: Web/SVG/Attribute/width
+---
+<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG属性参考主页</a></p>
+
+<p>该属性在用户坐标系统中标识了一个水平长度。该坐标的确切效果依赖于每个元素。大多数时候,它体现引用元素的矩形区域的宽度(请阅读每个元素的文档以了解例外情况)。</p>
+
+<p>除了<code>&lt;svg&gt;</code>元素之外,别的元素都必须指定该属性,<code>&lt;svg&gt;</code>的宽度默认是<strong>100%</strong>,而<code>&lt;filter&gt;</code>元素以及<code>&lt;mask&gt;</code>元素的默认宽度是<strong>120%</strong>。</p>
+
+<h2 id="用法">用法</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="row">类别</th>
+ <td>无</td>
+ </tr>
+ <tr>
+ <th scope="row">值</th>
+ <td><a href="/en/SVG/Content_type#Length" title="https://developer.mozilla.org/en/SVG/Content_type#Length">&lt;length&gt;</a></td>
+ </tr>
+ <tr>
+ <th scope="row">可变性</th>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <th scope="row">规范文档</th>
+ <td><a class="external" href="http://www.w3.org/TR/SVG/extend.html#ForeignObjectElementWidthAttribute" title="http://www.w3.org/TR/SVG/extend.html#ForeignObjectElementWidthAttribute">SVG 1.1 (2nd Edition): foreignObject element</a><br>
+ <a class="external" href="http://www.w3.org/TR/SVG/struct.html#ImageElementWidthAttribute" title="http://www.w3.org/TR/SVG/struct.html#ImageElementWidthAttribute">SVG 1.1 (2nd Edition): image element</a><br>
+ <a class="external" href="http://www.w3.org/TR/SVG/pservers.html#PatternElementWidthAttribute" title="http://www.w3.org/TR/SVG/pservers.html#PatternElementWidthAttribute">SVG 1.1 (2nd Edition): pattern element</a><br>
+ <a class="external" href="http://www.w3.org/TR/SVG/shapes.html#RectElementWidthAttribute" title="http://www.w3.org/TR/SVG/shapes.html#RectElementWidthAttribute">SVG 1.1 (2nd Edition): rect element</a><br>
+ <a class="external" href="http://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute" title="http://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute">SVG 1.1 (2nd Edition): svg element</a><br>
+ <a class="external" href="http://www.w3.org/TR/SVG/struct.html#UseElementWidthAttribute" title="http://www.w3.org/TR/SVG/struct.html#UseElementWidthAttribute">SVG 1.1 (2nd Edition): use element</a><br>
+ <a class="external" href="http://www.w3.org/TR/SVG/filters.html#FilterPrimitiveWidthAttribute" title="http://www.w3.org/TR/SVG/filters.html#FilterPrimitiveWidthAttribute">SVG 1.1 (2nd Edition): Filter primitive</a><br>
+ <a class="external" href="http://www.w3.org/TR/SVG/masking.html#MaskElementWidthAttribute" title="http://www.w3.org/TR/SVG/masking.html#MaskElementWidthAttribute">SVG 1.1 (2nd Edition): mask element</a></td>
+ </tr>
+ </tbody>
+</table>
+
+<p>{{ page("/zh-CN/docs/Web/SVG/Content_type","长度") }}</p>
+
+<h2 id="元素">元素</h2>
+
+<p>下列元素可以使用<code>width</code>属性:</p>
+
+<ul>
+ <li><a href="/en/SVG/Element#FilterPrimitive" title="en/SVG/Element#FilterPrimitive">滤镜元素</a> »</li>
+ <li>{{ SVGElement("filter") }}</li>
+ <li>{{ SVGElement("foreignObject") }}</li>
+ <li>{{ SVGElement("image") }}</li>
+ <li>{{ SVGElement("pattern") }}</li>
+ <li>{{ SVGElement("rect") }}</li>
+ <li>{{ SVGElement("svg") }}</li>
+ <li>{{ SVGElement("use") }}</li>
+ <li>{{ SVGElement("mask") }}</li>
+</ul>