aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/attribute/marker-end
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/svg/attribute/marker-end
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/svg/attribute/marker-end')
-rw-r--r--files/zh-cn/web/svg/attribute/marker-end/index.html103
1 files changed, 103 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/attribute/marker-end/index.html b/files/zh-cn/web/svg/attribute/marker-end/index.html
new file mode 100644
index 0000000000..348f884d8a
--- /dev/null
+++ b/files/zh-cn/web/svg/attribute/marker-end/index.html
@@ -0,0 +1,103 @@
+---
+title: marker-end
+slug: Web/SVG/Attribute/marker-end
+translation_of: Web/SVG/Attribute/marker-end
+---
+<div>{{SVGRef}}</div>
+
+<p><strong><code>marker-end</code></strong> 属性将在给定<a href="/en-US/docs/Web/SVG/Element#Shape_elements">形状</a>的最终顶点绘制的箭头或者多边形标记。</p>
+
+<p>对于除SVG的polyline和path元素之外的所有形状元素,最后的一个顶点与第一个顶点相同。在这种情况下,如果SVG的marker-start属性和 <code>marker-end</code> 的值都不是 <code><span class="prop-value">none</span></code> ,然后再最后一个顶点渲染两个图标。 对于一个 <code><span class="element-name">&lt;path&gt;</span></code> 元素, 对于每个封闭的子路径,他的最后一个顶点都与第一个顶点相同。 <code>marker-end</code> 仅在<a href="/en-US/docs/Web/SVG/Attribute/d#Path_commands">路径数据</a>的最终顶点上呈现。</p>
+
+<p class="note"><strong>Note:</strong> 作为一个图像属性, <code>marker-end</code> 可以用作css属性.</p>
+
+<p>作为一个图像属性,他可以应用到所有的元素上,但是他只针对于一下其中元素有效:  {{SVGElement("circle")}}, {{SVGElement("ellipse")}}, {{SVGElement("line")}}, {{SVGElement("path")}}, {{SVGElement("polygon")}}, {{SVGElement("polyline")}}, and {{SVGElement("rect")}}</p>
+
+<div id="topExample">
+<div class="hidden">
+<pre class="brush: css notranslate">html, body, svg {
+ height: 100%;
+}</pre>
+</div>
+
+<pre class="brush: html; hightlight[12] notranslate">&lt;svg viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"&gt;
+ &lt;defs&gt;
+ &lt;marker id="triangle" viewBox="0 0 10 10"
+ refX="1" refY="5"
+ markerUnits="strokeWidth"
+ markerWidth="10" markerHeight="10"
+ orient="auto"&gt;
+ &lt;path d="M 0 0 L 10 5 L 0 10 z" fill="#f00"/&gt;
+ &lt;/marker&gt;
+ &lt;/defs&gt;
+ &lt;polyline fill="none" stroke="black"
+ points="20,100 40,60 70,80 100,20" marker-end="url(#triangle)"/&gt;
+&lt;/svg&gt;
+</pre>
+
+<p>{{EmbedLiveSample("topExample", "200", "200")}}</p>
+</div>
+
+<h2 id="使用说明">使用说明</h2>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Value</th>
+ <td><code>none</code> | <code>&lt;marker-ref&gt;</code></td>
+ </tr>
+ <tr>
+ <th scope="row">Default value</th>
+ <td><code>none</code></td>
+ </tr>
+ <tr>
+ <th scope="row">Animatable</th>
+ <td>Yes</td>
+ </tr>
+ </tbody>
+</table>
+
+<dl>
+ <dt><code>none</code></dt>
+ <dd>表示将不会在终点绘制任何符号。</dd>
+ <dt><code>&lt;marker-ref&gt;</code></dt>
+ <dd>这个值表示的是对 {{SVGElement("marker")}} 元素的引用, 将在终点绘制该元素.。如果引用无效,将不会绘制任何东西。</dd>
+</dl>
+
+<h2 id="技术指标">技术指标</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("SVG2", "painting.html#MarkerEndProperty", "marker-end")}}</td>
+ <td>{{Spec2("SVG2")}}</td>
+ <td>No significant change</td>
+ </tr>
+ <tr>
+ <td>{{SpecName("SVG1.1", "painting.html#MarkerEndProperty", "marker-end")}}</td>
+ <td>{{Spec2("SVG1.1")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("svg.attributes.presentation.marker-end")}}</p>
+
+<h2 id="另见">另见</h2>
+
+<ul>
+ <li>{{SVGElement("marker")}}</li>
+ <li>{{SVGAttr("marker-start")}}</li>
+ <li>{{SVGAttr("marker-mid")}}</li>
+</ul>