Svg-polyline

提供:Dev Guides
移動先:案内検索

SVG-ポリライン

<polyline>要素は、接続された直線を描くために使用されます。

宣言

以下は、 <polyline> 要素の構文宣言です。 主な属性のみを示しました。

<polyline
   points="list of points" >
</polyline>

属性

Sr.No. Name&Description
1 points − List of points to make up a polyline.

テストVG

<html>
   <title>SVG Polyline</title>
   <body>

      <h1>Sample SVG Polyline Image</h1>

      <svg width="800" height="800">
         <g>
            <text x="0" y="15" fill="black" >Polyline #1: Without opacity.</text>

            <polyline points="150,75 258,137.5 258,262.5 150,325 42,262.6 42,137.5"
            stroke="black" stroke-width="3" fill="none"></polyline>
         </g>
      </svg>

   </body>
</html>

出力

ChromeウェブブラウザでテキストSVGを開きます。 Chrome/Firefox/Operaを使用して、プラグインなしでSVG画像を直接表示できます。 Internet Explorer 9以降もSVG画像レンダリングをサポートしています。

不透明度のあるポリライン

<html>
   <title>SVG Polyline</title>
   <body>

      <h1>Sample SVG Polyline Image</h1>

      <svg width="800" height="800">
         <g>
            <text x="0" y="15" fill="black" >Polyline #2: With opacity </text>

            <polyline points="150,75 258,137.5 258,262.5 150,325 42,262.6 42,137.5"
            style="fill:none;stroke-width:3;
            stroke:rgb(0,0,0);stroke-opacity:0.5;"></polyline>
         </g>
      </svg>

   </body>
</html>

出力

ChromeウェブブラウザでテキストSVGを開きます。 Chrome/Firefox/Operaを使用して、プラグインなしでSVG画像を直接表示できます。 Internet Explorer 9以降もSVG画像レンダリングをサポートしています。