Invert svg image using css?

I am trying to invert a file with the extension .svg using css .I know .png and .jpg files can be inverted using css webkit properties. I am new to svg images. Can I invert .svg images using css ?

I tried using

  -webkit-filter:invert(1); filter:invert(1); 

but it didn’t work.

+5
source share
1 answer

You can try this

  svg { -webkit-filter: invert(100%); filter: invert(100%); } 

But you can also put your svg on <img src=""> and style, as in another format

+14
source

Source: https://habr.com/ru/post/1257422/


All Articles