Design comparison
Solution retrospective
I am having difficulties lining up the view icon over the equilibrium icon for when a hover action takes place. How do I stack these images on top of each other? I have commented out what I have so far, would appreciate some feedback.
Community feedback
- @imadvvPosted over 2 years ago
Hi Jovaughn Bennett, there are many ways to archive like this effect, one of them is to use
opacity:0
in both the icon and bgoverlay
and than change that toopacity:1
in hover .I actually took some time to look at your code, and I take some note heplfully you find some of them useul.
you can set this values
hoverimg {opacity : 0}
,.equimg{cursor: pointer;}
,.equilibrium{width: 100%}
,.icon{opacity:0}
and than.hoverimg:hover { opacity: 0.8; } .hoverimg:hover .icon { opacity: 1; }
also check for spell for some classes, Hope this help and happy coding!
Marked as helpful1 - @dannygomesPosted over 2 years ago
Hey! I also struggled with the hover image effect. I used a pseudo element to get it done, so I use the hover selector and then use the :after selector on that very same selector to create the pseudo element as the image is hovered. Then it's just a matter of setting the position absolute on the pseudo element and on the parent (I hope I explained myself correctly).
The more experienced developers helped me out with this on the Slack community in the #help channel, if you need help you should join, I really recommend it!
0 - @DAST-87Posted over 2 years ago
Eu utilizei POSITION - ABSOLUTE nas imagens. Depois é só organizar quem fica por cima ou por baixo com Z-INDEX.
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