Design comparison
SolutionDesign
Solution retrospective
Had trouble changing svg image color on hover
Community feedback
- @CorinaMurgPosted over 1 year ago
Hi Aliv!
Beautiful work!
Here's what worked for me for the hover effect:
-
go to the svg file. In the <path> element, change
fill="current color"
. -
in css, set
svg { color: white; }
andsvg:hover { color: green; }
.
This does require that you use <svg> and not <img> in your html. Hope this helps. Corina
Marked as helpful1 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord