diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
| commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
| tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/svg/attribute/visibility | |
| parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
| download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip | |
initial commit
Diffstat (limited to 'files/zh-cn/web/svg/attribute/visibility')
| -rw-r--r-- | files/zh-cn/web/svg/attribute/visibility/index.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/attribute/visibility/index.html b/files/zh-cn/web/svg/attribute/visibility/index.html new file mode 100644 index 0000000000..9a55be1722 --- /dev/null +++ b/files/zh-cn/web/svg/attribute/visibility/index.html @@ -0,0 +1,59 @@ +--- +title: visibility +slug: Web/SVG/Attribute/visibility +tags: + - SVG + - SVG属性 + - 需要兼容性表 +translation_of: Web/SVG/Attribute/visibility +--- +<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG属性参考主页</a></p> + +<p><code>visibility</code>属性让你能够控制一个图形元素的可见性。用了值<code>hidden</code>或者值<code>collapse</code>,当前的图形元素将不可见。</p> + +<div class="note"><strong>注意:</strong>如果 {{ SVGElement("tspan") }}元素、{{ SVGElement("tref") }}元素或{{ SVGElement("altGlyph") }}元素上的<code>visibility</code>属性设置为<code>hidden</code>,则文本变得不可见,但是依然占用文本布局计算的空间。</div> + +<p>根据属性{{ SVGAttr("pointer-events") }}的值,图形元素如果属性<code>visibility值设置为hidden,依然能够响应事件。</code></p> + +<p>作为一个外观属性,它可以直接用作CSS样式表内部的属性。请阅读{{ cssxref("visibility","CSS visibility") }}以了解更多信息。</p> + +<h2 id="用法">用法</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="row">类别</th> + <td>外观属性</td> + </tr> + <tr> + <th scope="row">值</th> + <td><strong title="this is the default value">visible</strong> | hidden | collapse | inherit</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/SVG11/painting.html#VisibilityProperty" title="http://www.w3.org/TR/SVG11/painting.html#VisibilityProperty">SVG 1.1 (2nd Edition)</a></td> + </tr> + </tbody> +</table> + +<h2 id="示例">示例</h2> + +<h2 id="元素">元素</h2> + +<p>下列元素楞以使用<code>visibility</code>属性:</p> + +<ul> + <li><a href="/en/SVG/Element#Graphics" title="en/SVG/Element#Graphics">图形元素</a> »</li> + <li><a href="/en/SVG/Element#Text_content_elements" title="en/SVG/Element#Text_content_elements">文本内容元素</a> »</li> +</ul> + +<h2 id="参见">参见</h2> + +<ul> + <li>属性{{ SVGAttr("display") }} </li> + <li>{{ cssxref("visibility","CSS visibility") }}</li> +</ul> |
