diff options
Diffstat (limited to 'files/zh-tw/web/svg/attribute/stroke-dashoffset/index.html')
-rw-r--r-- | files/zh-tw/web/svg/attribute/stroke-dashoffset/index.html | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/files/zh-tw/web/svg/attribute/stroke-dashoffset/index.html b/files/zh-tw/web/svg/attribute/stroke-dashoffset/index.html new file mode 100644 index 0000000000..e8a076e352 --- /dev/null +++ b/files/zh-tw/web/svg/attribute/stroke-dashoffset/index.html @@ -0,0 +1,75 @@ +--- +title: stroke-dashoffset +slug: Web/SVG/Attribute/stroke-dashoffset +tags: + - 可縮放矢量圖形 + - 可縮放矢量圖形 屬性 +translation_of: Web/SVG/Attribute/stroke-dashoffset +--- +<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG 屬性引用首頁</a></p> + +<p><code>stroke-dashoffset</code> 屬性指定一個數值至虛線的開頭。</p> + +<p>如果使用 <a href="/en/SVG/Content_type#Percentage" title="en/SVG/Content_type#Percentage"><percentage></a> ,值則會代表當前viewport的百分比。<br> + <br> + 值允許為負值。</p> + +<h2 id="Usage_context">Usage context</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="row">類別</th> + <td>Presentation attribute</td> + </tr> + <tr> + <th scope="row">可用值</th> + <td><a href="/en/SVG/Content_type#Percentage" title="en/SVG/Content_type#Percentage"><percentage></a> | <a href="/en/SVG/Content_type#Length" title="en/SVG/Content_type#Length"><span><length></span></a> | inherit</td> + </tr> + <tr> + <th scope="row">初始值</th> + <td>0</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/SVG11/painting.html#StrokeDashoffsetProperty" title="http://www.w3.org/TR/SVG11/painting.html#StrokeDashoffsetProperty">SVG 1.1 (2nd Edition)</a></td> + </tr> + </tbody> +</table> + +<h2 id="範例" name="範例">範例</h2> + +<h3 id="HTML_內容">HTML 內容</h3> + +<pre class="brush: html"><svg width="200" height="200" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg"> + <line stroke-dashoffset="0" stroke-dasharray="20" x1="0" y1="10" x2="200" y2="10"/> + <line stroke-dashoffset="10" stroke-dasharray="20" x1="0" y1="20" x2="200" y2="20"/> + <line stroke-dashoffset="20" stroke-dasharray="20" x1="0" y1="30" x2="200" y2="30"/> + <line stroke-dashoffset="50%" stroke-dasharray="20" x1="0" y1="40" x2="200" y2="40"/> + <line stroke-dashoffset="25%" stroke-dasharray="20" x1="0" y1="50" x2="200" y2="50"/> + <line stroke-dashoffset="0%" stroke-dasharray="20" x1="0" y1="60" x2="200" y2="60"/> +</svg></pre> + +<h3 id="CSS_內容">CSS 內容</h3> + +<pre class="brush: css">line{ + stroke: #51BBA7; + stroke-width: 2; +}</pre> + +<h3 id="結果">結果</h3> + +<p>{{ EmbedLiveSample('範例') }}</p> + +<h2 id="適用元素">適用元素</h2> + +<p>以下元素可以使用 <code>stroke-dashoffset</code> 屬性</p> + +<ul> + <li><a href="/en/SVG/Element#Shape" title="en/SVG/Element#Shape">Shape elements</a> »</li> + <li><a href="/en/SVG/Element#TextContent" title="en/SVG/Element#TextContent">Text content elements</a> »</li> +</ul> |