How to make the black and white svg-icon become colored when hovering? If there is a script, could you tell me what's what?

  • 2
  • Does the fill color change here just? - SvArt713
  • so surely, you can even substitute not the color, but the image - lexxl
  • Is it just through transit or are you writing something in the svg code? - SvArt713
  • And how to change the image? ) - SvArt713

1 answer 1

img:not(:hover) { transition: 2s; filter: saturate(0%); -webkit-filter: saturate(0%); } img:hover { transition: 1s; } 
 <img width=200 src="https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg">