Skip to content

OXTimoA/nft-preview-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 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

Screenshot for desktop

Screenshot for desktop

Screenshot for mobile

Links

My process

Desktop-first workflow

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Desktop-first workflow

What I learned

Just glancing through this code, after I've finished writing the code, it felt so easy. but honestly, the hardest part for me was the aspect where on hover, we were to render another image on top of the previous image and with background colour as well with the opacity of the background lighter than the image itself being rendered alongside. I've never done any project as such. So having coded this today I learnt how to do just that. Some of the code snippets were the codes are:

.imgCont {
  width: 100%;
  display: flex;
  justify-content: center;
}

.imgCont img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
  transition: all 1s ease-in-out;
}

div.viewImageContainer {
  position: relative;
}

div.viewcontainer {
  position: absolute;
  top: 0px;
  left: 0px;
}

div.viewcontainer img {
  opacity: 0;
  padding: 110px;
  color: white;
}

div.viewcontainer img:hover {
  opacity: 1;
  cursor: pointer;
  background-color: rgba(0, 255, 247, 0.3);
  transition: all 0.5s ease-in-out;
}

About

This is a solution to the NFT preview card component challenge on Frontend Mentor.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors