<path>
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
<path>
は SVG の要素で、図形を定義する汎用的な要素です。全ての基本図形は path 要素によって定義することができます。
例
html
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<path
d="M 10,30
A 20,20 0,0,1 50,30
A 20,20 0,0,1 90,30
Q 90,60 50,90
Q 10,60 10,30 z" />
</svg>
属性
d
-
この属性は、図形のパスを定義します。 値の型: <string>; 既定値:
''
; アニメーション: 可 pathLength
-
この属性は、ユーザー単位系でのパスの全長を指定することを可能にします。 値の型: <number>; 既定値: none; アニメーション: 可
使用可能な場所
仕様書
Specification |
---|
Scalable Vector Graphics (SVG) 2 # PathElement |
ブラウザーの互換性
関連情報
- SVG 基本図形:
<circle>
,<ellipse>
,<line>
,<polygon>
,<polyline>
,<rect>
- MDN の「ゼロから始める SVG 入門」チュートリアル : パス