'how to set or change color SVG icon in img tag - css? [duplicate]
As I expected, this question was asked a lot, but I did not find the answer to any of the questions, and no one gave exactly the answer I wanted.
I want to change or set the color of the svg in img tag!
Please guide me with its description. I want to solve my problem by using a CSS!
.container_image {
position: relative;
width: 100px;
height: 100px;
border: 2px dashed #ddd;
margin: 1rem auto;
display: flex;
justify-content: center;
align-items: center;
}
.container_image > img {
color: #333;
}
<div class="container_image">
<img src="svg_name.svg">
</div>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
