Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 1.85 KB

README.md

File metadata and controls

69 lines (49 loc) · 1.85 KB

Frontend Mentor - NFT preview card component solution

This is a solution to the NFT preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout depending on their device's screen size
  • See hover states for interactive elements

Screenshot

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox

What I learned

Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.

To see how you can add code snippets, see below:

This was the code that used in order to do the hover effect on the image. I've never done this, and I'm pretty sure that there are better ways to do it, but this worked for me for this projet.

.hover-color {
        position: relative;
        top: -101.1%;
        background-color: hsl(178, 100%, 50%);
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        border-radius: 10px;
    }

    .hover-color img:hover {
        height: 50px;
        color: white;
        opacity: 1;
    }

    .hover-color:hover {
        opacity: 0.5;
    }

Author