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 Preview Card Component using CSS Flexbox

Rowen 60

@RowenTey

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


I had a little trouble getting the hover effect for the image to work, gotta read up more on pseudo-elements! Feel free to leave any feedback, thanks and cheers!

Community feedback

Mo 840

@MohamedAridah

Posted

Hello @RowenTey, you did a good job here👍👏. ,but i have some notes for you:

  • When you use transition. Use it for the element itself not the element on :hover effect on it. ex:

    • The wrong way
       .element:hover{
       	transition: opacity 200ms linear;
       }
    
  • The right way

    	.element {
    		transition: opacity 200ms linear;
              }
    
  • One pseudo-element can do the hover effect fine weather ::after or ::before. ex:

	.card .img-wrapper::after {
        content: url(./images/icon-view.svg);
        position: absolute;
        background-color: /* Cyan color here... */;
        width: 100%;
        height: 100%;
        opacity: 0;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: .3s ease;
	}

by using the styles above you can remove .card .img-wrapper::before styles safely.

  • you can see My solution for this challenge it may be useful for you.!

I hope this wasn't too long for you, hoping also it was useful😍.

Goodbye and have a nice day.

Keep coding🚀

Marked as helpful

1

Rowen 60

@RowenTey

Posted

@MohamedAridah Thank you so much for your advice, I have learned another useful trick today! :)

0
Mo 840

@MohamedAridah

Posted

@RowenTey You are welcome👍🌹. I'm really glad this was useful for you.

1

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