W3cubDocs

/SVG

marker-mid

The marker-mid defines the arrowhead or polymarker that shall be drawn at every vertex other than the first and last vertex of the given <path> element or basic shape.

Usage context

Categories Presentation attribute
Value none | <funciri> | inherit
Animatable Yes
Normative document SVG 1.1 (2nd Edition)
none
Indicates that no marker symbol shall be drawn at the given vertex.
<funciri>
The <funciri> is a Functional IRI reference to the <marker> element which shall be used as the arrowhead symbol or polymarker at the given vertex or vertices. If the IRI reference is not valid (e.g., it points to an object that is undefined or the object is not a <marker> element), then the marker(s) will not be drawn.

Examples

<svg width="200" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <marker id="circle" markerWidth="4" markerHeight="4" refX="2" refY="2">
        <circle cx="2" cy="2" r="2" 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>

Elements

The following elements can use the marker-mid attribute

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support ? ? ? ? ? ?
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support ? ? ? ? ? ? ?

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-mid