Line
<svg height="210" width="500"> <line x1="0" y1="0" x2="200" y2="200" style="stroke: rgb(255, 0 ,0); stroke-width: 2" ></line> </svg>
直线就是一条线段
Polygon
<svg height="210" width="500"> <polygon points="200,10 300,180 180,190" style="fill:#ccc; stroke:#000; stroke-width: 2" ></polygon> </svg> <svg height="210" width="500"> <polygon points="200,10 140,200 300,75 100,75 260,200" style="fill:#ccc; stroke:#000; stroke-width:5;fill-rule:evenodd;" ></polygon> </svg>
Polyline
<svg height="200" width="500"> <polyline points="20,20 40,25 60,40 80,120 120,140 200,180" style="stroke-width: 3; stroke: #000; fill: none"></polyline> </svg> <svg height="200" width="500"> <polyline points="0,40 40,40 40,80 80,80 80,120 120,120 120,160 160,160" style="stroke-width: 3; stroke: #000; fill: none"></polyline> </svg>