I have a button which uses an SVG image.
How do I get the fill color to work? Currently it's not working, and is showing the default SVG color which is black. Note that I can't use jQuery, and prefer to keep it to pure CSS/HTML if possible. Is there any way to change the svg fill color with only CSS/HTML?
Note: Below, local SVG file replaced with sample.
.modal-close {
width: 30px;
height: 30px;
border: 0;
border-radius: 30px;
font-size: 28px;
fill: #777;
}
.modal-close:focus {
outline: 0;
}
.modal-close:hover {
fill: #41b97c;
}
.modal-close:active {
background-color: #41b97c;
fill: white;
}
<input type="image" src="//dev.w3.org/SVG/tools/svgweb/samples/svg-files/duck.svg" class="modal-close pull-right" aria-label="Close">