--- title: stroke slug: Web/SVG/Attribute/stroke tags: - SVG - SVG Attribute translation_of: Web/SVG/Attribute/stroke ---
« SVG Attribute reference home
stroke属性は与えられた図形要素の外側に描画される色を定義します。stroke属性のデフォルト値は none です.
| カテゴリ | プレゼンテーション属性 |
|---|---|
| 値 |
<paint>, |
| アニメーション | 可 |
| 標準文書 | SVG 1.1 (2nd Edition) |
<svg height="50" width="300">
<path stroke="green" d="M5 20 1215 0" />
</svg>
{{ EmbedLiveSample('例1_stroke_を使用した直線', '300', '50', '', 'Web/SVG/Attribute/stroke') }}
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" stroke="blue" stroke-width="2" fill="black" />
</svg>
{{ EmbedLiveSample('例2_黒丸の枠線として青い_stroke_を使用', '100', '120', '', 'Web/SVG/Attribute/stroke') }}
context-stroke を使用する非標準かつ機能が制限されたcontext-stroke (およびcontext-fill) については {{cssxref("-moz-context-properties")}} プロパティを参照して下さい。
以下の要素でstroke属性を使用できます。