Submitted almost 3 years ago
made responsive by just scaling the main div
@valcruxx
Design comparison
SolutionDesign
Solution retrospective
I was unable to display the view image on hover, but the image is there. i just set the display property to none.
Community feedback
- @byronbyronPosted almost 3 years ago
Hello
I would suggest putting the hover on the parent
#image-div
and then applyingopacity: 1;
to#view
to make the eye icon appear. Something like:#image-div { display: flex; justify-content: center; align-items: center; border-radius: 10px; overflow: hidden; margin: 20px; background: hsl(178, 100%, 50%); } #image-div img { width: 100%; } #image-div:hover img { opacity: 20%; cursor:pointer; transition:0.3s ease; } #view { position: absolute; max-width: 40px; opacity: 0; } #image-div:hover #view { opacity: 1; }
Also, check your accessibility/html issues flagged by frontend mentor 👍
1@valcruxxPosted almost 3 years ago@byronbyron Thanks a million, that worked!
I'll check the accessibility issues
Thanks again
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