line
<line>
要素は SVG の基本図形であり、2 つの点をつなぐ直線を作成するために使用します。
html
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<line x1="0" y1="80" x2="100" y2="20" stroke="black" />
<!-- If you do not specify the stroke
color the line will not be visible -->
</svg>
属性
x1
-
線の始点の X 座標を定義します。 値の型: <length>|<percentage>|<number> ; 既定値:
0
; アニメーション: 可 x2 (en-US)
-
線の終点の X 座標を定義します。 値の型: <length>|<percentage>|<number> ; 既定値:
0
; アニメーション: 可 y1 (en-US)
-
線の始点の Y 座標を定義します。 Value type: <length>|<percentage>|<number> ; 既定値:
0
; アニメーション: 可 y2 (en-US)
-
線の終点の Y 座標を定義します。 Value type: <length>|<percentage>|<number> ; 既定値:
0
; アニメーション: 可 pathLength (en-US)
-
パス全体の長さをユーザーの単位で定義します。 Value type: <number> ; 既定値: none; アニメーション: 可
グローバル属性
- コア属性
-
主なもの:
id
,tabindex (en-US)
- スタイル属性
class (en-US)
,style (en-US)
- 条件付き処理属性
- イベント属性
- プレゼンテーション属性
-
主なもの:
clip-path (en-US)
,clip-rule (en-US)
,color
,color-interpolation (en-US)
,color-rendering
,cursor (en-US)
,display (en-US)
,fill
,fill-opacity
,fill-rule (en-US)
,filter (en-US)
,mask (en-US)
,opacity (en-US)
,pointer-events (en-US)
,shape-rendering (en-US)
,stroke
,stroke-dasharray
,stroke-dashoffset
,stroke-linecap
,stroke-linejoin
,stroke-miterlimit
,stroke-opacity (en-US)
,stroke-width (en-US)
,transform
,vector-effect
,visibility (en-US)
- ARIA 属性
-
aria-activedescendant
,aria-atomic
,aria-autocomplete
,aria-busy
,aria-checked
,aria-colcount
,aria-colindex
,aria-colspan
,aria-controls
,aria-current
,aria-describedby
,aria-details
,aria-disabled
,aria-dropeffect
,aria-errormessage
,aria-expanded
,aria-flowto
,aria-grabbed
,aria-haspopup
,aria-hidden
,aria-invalid
,aria-keyshortcuts
,aria-label
,aria-labelledby
,aria-level
,aria-live
,aria-modal
,aria-multiline
,aria-multiselectable
,aria-orientation
,aria-owns
,aria-placeholder
,aria-posinset
,aria-pressed
,aria-readonly
,aria-relevant
,aria-required
,aria-roledescription
,aria-rowcount
,aria-rowindex
,aria-rowspan
,aria-selected
,aria-setsize
,aria-sort
,aria-valuemax
,aria-valuemin
,aria-valuenow
,aria-valuetext
,role
使用上のメモ
仕様書
Specification |
---|
Scalable Vector Graphics (SVG) 2 # LineElement |
ブラウザーの互換性
BCD tables only load in the browser
関連情報
- その他の SVG 基本図形:
<circle>
,<ellipse>
,<polygon>
,<polyline>
,<rect>