Answer the question
In order to leave comments, you need to log in
How to style SVG with CSS?
Hello.
The question is the following. For example, there is a square in the form of SVG. It is white, located in a specific block:
<div>
<div class="square"></div>
</div>
and loaded as a background via CSS:.square {
background:url('square.svg'); /* квадрат белого цвета */
}
<div class="black">
<div class="square"></div>
</div>
.square {
background:url('square.svg'); /* квадрат должен стать черного цвета */
}
.black > .fil { /* .fil — это класс присвоенный в самом файле svg (<path class="fil" />) */
fill:black;
}
Does not help.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question