SVG样式属性是所有可以在任何SVG元素上指定以应用CSS样式效果的属性。
属性
class
- 给一个元素分配一个类名称或者设置类名。它跟 HTML中的
class
属性具有同样的功能。
Value: 任何可用的ID字符; Animatable: Yes style
- 它指定元素的样式信息。它跟HTML中
style
属性具有相同的功能。
Value:任何可用的ID字符; Animatable: No
浏览器支持
此页面上的兼容性表有结构化数据产生。如果你想贡献数据,请查看https://github.com/mdn/browser-compat-data 和发送给我们一个请求。
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
class | Chrome Full support Yes | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
style | Chrome Full support Yes | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
Legend
- Full support
- Full support