C
C
CrewCut2017-02-03 16:02:39
css
CrewCut, 2017-02-03 16:02:39

Is it possible to control the color of an SVG file in an img/background tag via a css file?

On the site, all icons, logos, etc. stuff in SVG. Somewhere as img, somewhere as background-image. Is it possible to somehow control their color through css, so that you can change the palette of icons in one place or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zhivagin, 2017-02-03
@Krasnodar_etc

Look for "inline svg", even on the toaster there were several questions of such and detailed answers. Briefly - you can insert img into the code, and jQuery (alas, it is required) will run through the code and insert svg there. In your code, just img will remain, but it will be possible to control the color through
With a background, it will not work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question