Answer the question
In order to leave comments, you need to log in
How easy is it to use SVG icons so that you can change their color with CSS?
For example, there is a folder with icons in the name.svg format . How can I add them to an HTML document so that I can change their color with CSS? I tried to add them as a regular picture, using , but:
1 the color of the icons cannot be changed by any methods known to me
2 I think that this is not correct
Please help. Googled, but never found a sensible article that would explain how to do this easily and simply.
Is it possible to somehow add them as a font, so that font-size can also be set?
Answer the question
In order to leave comments, you need to log in
1. Embed svg into the page.
2. For its elements, color must not be specified through attributes.
Inkscape for creating fonts. Or you can search for an online service. And so open it with notepad and copy in HTML what is between the svg tags. Then in CSS it will be possible to change the fill property of this object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question