SVG <폴리라인>


SVG 폴리라인 - <폴리라인>

실시예 1

<polyline> 요소는 직선(여러 점에서 연결됨)으로만 구성된 모양을 만드는 데 사용됩니다.

Sorry, your browser does not support inline SVG.

다음은 SVG 코드입니다.

예시

<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>

코드 설명:

  • 포인트 속성은 폴리라인을 그리는 데 필요한 포인트 목록(x 및 y 좌표 쌍)을 정의합니다.

실시예 2

직선만 있는 또 다른 예:

Sorry, your browser does not support inline SVG.

다음은 SVG 코드입니다.

예시

<svg height="180" width="500">
  <polyline points="0,40 40,40 40,80 80,80 80,120 120,120 120,160"
  style="fill:white;stroke:red;stroke-width:4" />
</svg>