Design comparison
SolutionDesign
Solution retrospective
What specific areas of your project would you like help with?
I want a help in "How to change the fill of an svg when it is hovered"
Community feedback
- @DeeNue36Posted 3 months ago
To be able to fill an svg image on hover you have to use it as an <svg> element and not an <img> element. Open the svg image in your browser, open devtools and copy what you see or open it in your code editor and copy it. Give the <svg> element a class or an id then add a "fill-rule" of nonzero or evenodd to the path of the <svg>. You can take out the fill color from the path and put it in your class style, :hover should work now.
Let me know if this helps.
0@shravanchinchkarPosted 2 months agoI will try it and circle you back@DeeNue36
0
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