Beispiel:SVG-marker-2.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!DOCTYPE html>
<html lang="de">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css">
  <style>
marker, marker path {
  fill: #dfac20;
  stroke: #000;
  stroke-width: 1;
} 

.poly {
  fill: none;
  stroke: #337599;
  stroke-width: 2;
  marker: url(#markerAnfang);
  marker-mid: url(#markerKreis);
  marker-end: url(#markerPfeil);
}
text {
  font-size: ;
  }

  </style>
  <title>SVG-Markierungen 2</title>
</head>
 
<body>
<h1>SVG-Markierungen<br>Start-, Zwischen- und Endpunkte setzen</h1>
 
<svg viewBox="0 0 800 550">
<defs>
	<marker id="markerAnfang" markerWidth="6" markerHeight="6" refX="3" refY="3">
		<rect x=".5" y=".5" width="5" height="5" /> 
	</marker>
	<marker id="markerKreis" markerWidth="6" markerHeight="6" refX="3" refY="3">
		<circle cx="3" cy="3" r="2.5" />
	</marker>
	<marker id="markerPfeil" markerWidth="130" markerHeight="16" refX="3" refY="3">
		<path d="M1,.5 v5 l6,-3z " />
		<text x="15" y="12" stroke="none" fill="#c82f04">Ziel</text>
	</marker>
</defs>
 
<path class="poly" d="M20,10 v100 h100" />
 
<path class="poly" d="M20,150 v100 h100 m50,0 c100,-140 150,140 250,0 c100,-140 150,140 250,0"/>
 
</svg>

</body>
</html>