BR
asked on
how to color svg file in HTML?
dear experts
I want to use svg icon on my web page
I use bootsrap4 css and below code like this.
<img class="icon icon-account-login" src="img/svg/account-login .svg">
my css file is like this, but I see the icon but the colour is black not #f00
how can I color the svg picture?
.icon-account-login {
fill: #f00;
}
I want to use svg icon on my web page
I use bootsrap4 css and below code like this.
<img class="icon icon-account-login" src="img/svg/account-login
my css file is like this, but I see the icon but the colour is black not #f00
how can I color the svg picture?
.icon-account-login {
fill: #f00;
}
You can't style SVG images loaded in an Image tag - only inline SVG can be styled.
ASKER
dear Julian Hansen,
can you give me an example please? how can I style it, change the color?
can you give me an example please? how can I style it, change the color?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Julian Hansen
You are welcome.