Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

nft

jamaldada 160

@jamaldada

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


please how did y'all make the image show after being hovered on?

Community feedback

Cr0zy07 60

@Cr0zy07

Posted

Hi There,  I used the 'after' pseudo element on the outer 'div' of the image, and added relative position on that 'div'...

Take a look at this snippet...

.card .card-image { height: calc(320px - 3rem); width: calc(320px - 3rem); border-radius: 1rem; position: relative; overflow: hidden; }

.card .card-image::after { content: ""; height: 100%; width: 100%; position: absolute; top: 0; left: 0; background: hsl(178, 100%, 50%, .5) url('images/icon-view.svg') no-repeat center; opacity: 0; transition: .5s ease; }

, or better see my solution to get better understanding https://cr0zy07.github.io/training/NFT-preview-card-component/...

Good luck...

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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