Design comparison
SolutionDesign
Solution retrospective
I could not figure out how to implement hover background-color on image 😥😥
Community feedback
- @hitmorecodePosted about 1 year ago
You can do something like this
<div class="image"> <img src="" alt=""> <div class="overlay"></div> </div>
.image { position: relative; } .overlay { width: /* the same as the image */; height: /* the same as the image */; position: absolute; top: 0; left: 0; } .overlay:hover { background-color: hsla(178, 100%, 50%, 0.5); }
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