2015-06-03 20 views
0

如何更改下面的标记以便连接多段线的端点。如何在html中将svg多段线的一端连接到另一端

<html> 
<head> 
</head> 
<body> 

<svg height="200" width="500"> 
<polyline points="20,20 40,25 60,40 80,120 120,140 200,180" 
    style="fill:none;stroke:black;stroke-width:3" /> 
</svg> 
</body> 
</html> 
+0

改善了初始句子的语法和清晰度。 –

回答

0

第一点添加到列表的末尾:

<svg height="200" width="500"> 
<polyline points="20,20 40,25 60,40 80,120 120,140 200,180 20,20" 
      style="fill:none;stroke:black;stroke-width:3" /> 
</svg> 
</body> 
1

使用<polygon>而不是<polyline>

<svg height="200" width="500"> 
    <polygon points="20,20 40,25 60,40 80,120 120,140 200,180" 
      style="fill:none;stroke:black;stroke-width:3" /> 
</svg> 
相关问题