L
L
lynnikvadim2015-09-14 18:51:42
css
lynnikvadim, 2015-09-14 18:51:42

How to change the color of an SVG?

There is a svg file. Located in a folder "/site/img/category/checkered7.svg"
. With the help of this code, it is displayed on the page:

<img style="color: blue; fill: rgb(148, 211, 27);" src="../..//site/img/category/checkered7.svg  " alt="" width="20">

How can I remember the color of the icon (in the file it is written that the picture is black)
When hovering, it is also impossible to change the color.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kravchenko, 2015-09-14
@mydearfriend

to change color with css, you need to insert svg inline.
<svg ...><path d="..." /></svg>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question