aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/attribute/opacity
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/svg/attribute/opacity')
-rw-r--r--files/zh-cn/web/svg/attribute/opacity/index.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/attribute/opacity/index.html b/files/zh-cn/web/svg/attribute/opacity/index.html
new file mode 100644
index 0000000000..1d5940c7d6
--- /dev/null
+++ b/files/zh-cn/web/svg/attribute/opacity/index.html
@@ -0,0 +1,69 @@
+---
+title: opacity
+slug: Web/SVG/Attribute/opacity
+tags:
+ - SVG
+ - SVG属性
+ - 需要兼容性表
+ - 需要示例
+translation_of: Web/SVG/Attribute/opacity
+---
+<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG属性参考主页</a></p>
+
+<p>opacity属性指定了一个对象或一组对象的透明度,也就是说,元素后面的背景的透过率。</p>
+
+<p>作为一个外观属性,它可以直接用作CSS样式表内部的属性,请阅读 {{ cssxref("opacity","CSS opacity") }}以了解更多信息。</p>
+
+<h2 id="用法">用法</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="row">类别</th>
+ <td>外观属性</td>
+ </tr>
+ <tr>
+ <th scope="row">值</th>
+ <td>&lt;opacity-value&gt; | 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/masking.html#OpacityProperty" title="http://www.w3.org/TR/SVG11/masking.html#OpacityProperty">SVG 1.1 (2nd Edition)</a></td>
+ </tr>
+ </tbody>
+</table>
+
+<dl>
+ <dt>&lt;opacity-value&gt;</dt>
+ <dd>一致的不透明度设置,作为一个<a href="/en/SVG/Content_type#Number" title="en/SVG/Content_type#Number">&lt;number&gt;</a>被应用到整个对象上。任何超过范围0.0到1.0的值都会被压回这个范围。0.0表示完全透明,1.0表示完全不透明。</dd>
+</dl>
+
+<h2 id="示例">示例</h2>
+
+<h2 id="元素">元素</h2>
+
+<p>以下元素可以使用<code>opacity</code>属性:</p>
+
+<ul>
+ <li><a href="/en/SVG/Element#Graphics" title="en/SVG/Element#Graphics">图形元素</a> »</li>
+ <li>{{ SVGElement("a") }}</li>
+ <li>{{ SVGElement("defs") }}</li>
+ <li>{{ SVGElement("glyph") }}</li>
+ <li>{{ SVGElement("g") }}</li>
+ <li>{{ SVGElement("marker") }}</li>
+ <li>{{ SVGElement("missing-glyph") }}</li>
+ <li>{{ SVGElement("pattern") }}</li>
+ <li>{{ SVGElement("svg") }}</li>
+ <li>{{ SVGElement("switch") }}</li>
+ <li>{{ SVGElement("symbol") }}</li>
+</ul>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{ cssxref("opacity","CSS opacity") }}</li>
+</ul>