Tried to briefly fill in the red color. The result is no.

.icon { fill: red; background: url("https://daks2k3a4ib2z.cloudfront.net/57a245dbf22749a73c2095bc/57ade47d1fd32dc352ace5b5_5774494a52b43cbe655759a1_home.svg"); } 
  • but in general is not enough opportunity? - Valery Anestiadi
  • I dare to suggest that if you try and configure the transmitting svg side, so that when you change part of the URL request, the color changes. This is real: svg can be edited as a text file. Yes, it all depends on the complexity of the picture itself ... but I would think in this direction - Shilgen
  • look in svg mask: jsfiddle.net/Geyan/7nsajzdv see examples how it works - user33274
  • for example, I applied a mask to Gif animation: codepen.io/Geyan/pen/YGdBqY?editors=110 - user33274

1 answer 1

To modify SVG via CSS, all code from an SVG file must be on your page in the DOM tree. Then you can change styles using CSS selectors.