--- title: SVG スタイル付け属性 slug: Web/SVG/Attribute/Styling tags: - 属性 - 初心者 - NeedsExample - リファレンス - SVG browser-compat: svg.attributes.style --- SVG のスタイル付け属性は、CSS スタイリング効果を適用するために任意の SVG 要素に指定できるすべての属性です。 * [`class`](#attr-class) * [`style`](#attr-style) ## 属性 * {{SVGAttr('class')}} * : 要素に 1 つまたは複数のクラス名を割り当てます。HTML の {{htmlattrxref('class')}} 属性と同様の機能を持ちます。 *値*: 任意の ID 文字列、*アニメーション*: **可** * {{SVGAttr('style')}} * : その要素のスタイル情報を指定します。HTML の {{htmlattrxref('style')}} 属性と同様の機能を持ちます。 *値*: 任意のスタイル文字列、*アニメーション*: **不可** ## ブラウザーの互換性 {{Compat}}