Skip to content

MuhammadTatma/nft-preview-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS Flexbox

What I learned

while working through this project i find it difficult to apply hover state to the image. finallay i found another CSS property which is background-image and i found another way to use color in css which is HSLA color. This my solution looks like this:

.overlay:hover{    
    background-image: url(./images/icon-view.svg);
    background-repeat: no-repeat;
    background-position-x: center;
    background-position-y: center;
    background-color: hsla(178, 100%, 50%, 0.5);    
}

Useful resources

  • CSS background-image property - This helped me This helped me explore css background-image property. I really liked this website and will use it going forward.
  • CSS color - This is helped me to implement the opacity using HSLA color.

Author