---
title: SVG样式属性
slug: Web/SVG/Attribute/Styling
translation_of: Web/SVG/Attribute/Styling
original_slug: Web/SVG/Attribute/样式
---
SVG样式属性是所有可以在任何SVG元素上指定以应用CSS样式效果的属性。
属性
- {{SVGAttr('class')}}
- 给一个元素分配一个类名称或者设置类名。它跟 HTML中的{{htmlattrxref('class')}}属性具有同样的功能。
Value: 任何可用的ID字符; Animatable: Yes
- {{SVGAttr('style')}}
- 它指定元素的样式信息。它跟HTML中 {{htmlattrxref('style')}}属性具有相同的功能。
Value:任何可用的ID字符; Animatable: No
浏览器支持
{{Compat("svg.attributes.style")}}