change color of svg images with css

2019-06-24 16:59发布

I have an svg image on my page which I am including like this:

<img src="image.svg" class="arrow"/>
  • I want to change its color with css. Is this possible?

2条回答
Emotional °昔
2楼-- · 2019-06-24 17:36
唯我独甜
3楼-- · 2019-06-24 17:40

You can't. If you're trying to make it a rollover image, create a new SVG image with the changed colour, then look at this code to use JavaScript to make it a rollover image.

If you're not using it as a rollover, then I can't do any more.

查看更多
登录 后发表回答