SVG:直線を引く
SVGで直線を描画するには、line要素を使用する
line要素は始点と終点のみで描かれる
SVG:line
-
SVG:line要素
https://svg-hosting.vercel.app/api/svg?url=https://scrapbox.io/api/code/suto3/SVG:直線を引く/l.svg
code:l.svg
<svg xmlns="
http://www.w3.org/2000/svg"
viewBox="0 0 200 150" width="200" height="150">
<line x1="10" y1="30" x2="180" y2="130" fill="none" stroke="#000" />
</svg>
SVG:直線
SVG:基本図形
ラインアート