LoginSignup
9

More than 5 years have passed since last update.

SVG polylineとpolygon 超基礎

Last updated at Posted at 2016-06-03

スクリーンショット 2016-06-03 17.29.53.png

(左)
polyline .....点を経由して線を引く

(右)
polygon .....点を経由して線を引く、始点と終点で閉じる

hoge.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>polylineとpolygon</title>
</head>
<body>
    <svg width="500" height="500">
        <!-- polyline .....点を経由して線を引く -->
        <polyline points="100 50 150 100 50 100" stroke="black" fill="none"/>
        <!-- polygon .....点を経由して線を引く、始点と終点で閉じる -->
        <polygon points="250 50 300 100 250 100" stroke="black" fill="none"/>
    </svg>
</body>
</html>

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9