什么样的svg前端可以改颜色

其实前端不是所有 SVG 都能改颜色,关键看 SVG 是怎么画的。

最推荐

使用 **currentColor**。

1
2
3
4
5
6
<svg viewBox="0 0 24 24">  
<path
fill="currentColor"
d="..."
/>
</svg>
阅读更多