aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/attribute/stroke-dashoffset/index.html
blob: e50b2bb28e7914d18015618c3b32a90afda61186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
title: stroke-dashoffset
slug: Web/SVG/Attribute/stroke-dashoffset
tags:
  - SVG
  - SVG属性
  - 需要兼容性表
  - 需要示例
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> 属性指定了dash模式到路径开始的距离</p>

<p>如果使用了一个 <a href="/en/SVG/Content_type#Percentage" title="en/SVG/Content_type#Percentage">&lt;百分比&gt;</a> 值, 那么这个值就代表了当前viewport的一个百分比。<br>
 <br>
 值可以取为负值。</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#Percentage" title="en/SVG/Content_type#Percentage">&lt;percentage&gt;</a> | <a href="/en/SVG/Content_type#Length" title="en/SVG/Content_type#Length"><span>&lt;length&gt;</span></a> | inherit</td>
  </tr>
  <tr>
   <th scope="row">初始值</th>
   <td>1</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#StrokeDashoffsetProperty">SVG 1.1 (2nd Edition)</a></td>
  </tr>
 </tbody>
</table>

<h2 id="示例">示例</h2>

<h2 id="元素">元素</h2>

<p>以下元素可使用stroke-dashoffset属性</p>

<ul>
 <li><a href="/en/SVG/Element#Shape" title="en/SVG/Element#Shape">形状元素</a> »</li>
 <li><a href="/en/SVG/Element#TextContent" title="en/SVG/Element#TextContent">文本内容元素</a> »</li>
</ul>