--- title: marker-mid slug: Web/SVG/Attribute/marker-mid tags: - SVG - SVG Attribute - SVG 属性 translation_of: Web/SVG/Attribute/marker-mid ---
marker-mid 属性は、指定されたシェイプの中間の頂点すべてに描かれる矢印やマーカーを定義します。
マーカーは、パスデータの最初と最後以外のすべての頂点に描画されます。
メモ: プレゼンテーション属性なので、 marker-mid は CSS プロパティとして使用することができます。
プレゼンテーション属性として任意の要素に適用できますが、 {{SVGElement("circle")}}, {{SVGElement("ellipse")}}, {{SVGElement("line")}}, {{SVGElement("path")}}, {{SVGElement("polygon")}}, {{SVGElement("polyline")}}, {{SVGElement("rect")}} の7つの要素でのみ効果があります。
html, body, svg {
height: 100%;
}
<svg viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="circle" markerWidth="8" markerHeight="8" refX="4" refY="4">
<circle cx="4" cy="4" r="4" stroke="none" fill="#f00"/>
</marker>
</defs>
<polyline fill="none" stroke="black"
points="20,100 40,60 70,80 100,20" marker-mid="url(#circle)"/>
</svg>
{{EmbedLiveSample("topExample", "200", "200")}}
| 既定値 | none | <marker-ref> |
|---|---|
| 値 | none |
| アニメーション | 可 |
none<marker-ref>| 仕様書 | 状態 | 備考 |
|---|---|---|
| {{SpecName("SVG2", "painting.html#MarkerEndProperty", "marker-mid")}} | {{Spec2("SVG2")}} | 重要な変更なし |
| {{SpecName("SVG1.1", "painting.html#MarkerEndProperty", "marker-mid")}} | {{Spec2("SVG1.1")}} | 初回定義 |
{{Compat("svg.attributes.presentation.marker-mid")}}