更改SVG颜色 [英] Change SVG Colour
本文介绍了更改SVG颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您可以更改SVG内部形状的颜色吗?目前,我使用的PNG必须在Photoshop中为每个不同的菜单手动创建,我想知道是否可以使整个过程动态化.
Can you change the color of a shape inside an SVG? Currently I'm using a PNG that I have to manually create in Photoshop for each different menu and I'm wondering if I can make the whole process dynamic.
推荐答案
您不能只使用 style="background-color: #------;"
(或者也许是color:
)吗?
Can't you just use style="background-color: #------;"
(or maybe color:
)?
我的错误是,您需要的是填充,所以style="fill:#------;"
,它应该适用于任何形状.
My mistake, the one you need is fill, so style="fill:#------;"
, and it should work with any shape.
这篇关于更改SVG颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文