aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/attribute/stroke
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/svg/attribute/stroke')
-rw-r--r--files/zh-cn/web/svg/attribute/stroke/index.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/attribute/stroke/index.html b/files/zh-cn/web/svg/attribute/stroke/index.html
new file mode 100644
index 0000000000..75b7ef25f4
--- /dev/null
+++ b/files/zh-cn/web/svg/attribute/stroke/index.html
@@ -0,0 +1,66 @@
+---
+title: stroke
+slug: Web/SVG/Attribute/stroke
+tags:
+ - SVG
+ - SVG属性
+ - 需要兼容性表
+translation_of: Web/SVG/Attribute/stroke
+---
+<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG属性参考主页</a></p>
+
+<p><code>stroke</code>属性定义了给定图形元素的外轮廓的颜色。它的默认值是<strong>none</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#Paint" title="en/SVG/Content_type#Paint">&lt;paint&gt;</a></td>
+ </tr>
+ <tr>
+ <th scope="row">可变性</th>
+ <td>是</td>
+ </tr>
+ <tr>
+ <th scope="row">规范文档</th>
+ <td><a class="external" href="http://www.w3.org/TR/SVG/painting.html#StrokeProperty" title="http://www.w3.org/TR/SVG/painting.html#StrokeProperty">SVG 1.1 (2nd Edition)</a></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="示例">示例</h2>
+
+<p>​</p>
+
+<h2 id="SVG_Line" name="SVG_Line">SVG 描边的线</h2>
+
+<h3 id="示例1:用stroke属性画一条绿色的直线.">示例1:用stroke属性画一条绿色的直线.</h3>
+
+<pre class="brush: html">&lt;svg height="50" width ="300"&gt;
+ &lt;path stroke = "green" d="M5 20 1215 0" /&gt;
+&lt;/svg&gt;</pre>
+
+<h3 id="sect1"> </h3>
+
+<h3 id="示例2:用Stroke属性画一个拥有蓝色边框的黑色的圆形">示例2:用Stroke属性画一个拥有蓝色边框的黑色的圆形</h3>
+
+<pre class="brush: html">​​&lt;svg height="200" width="200"&gt;
+ &lt;circle cx="50" cy="50" r="40" stroke="blue" stroke-width="2" fill ="black" /&gt;
+&lt;/svg&gt;</pre>
+
+<p> </p>
+
+<h2 id="元素">元素</h2>
+
+<p>下列元素可以使用<code>stroke</code>属性:</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en/SVG/Element#Shape" title="en/SVG/Element#Shape">形状元素</a> »</li>
+ <li><a href="https://developer.mozilla.org/en/SVG/Element#TextContent" title="en/SVG/Element#TextContent">文本内容元素</a> »</li>
+</ul>