Skip to content

c-costin/product-preview-card-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Product preview card component solution

This is a solution to the Product 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 and focus states for interactive elements

Screenshot

Version mobile:

Version desktop :

Links

My process

Built with

  • Semantic HTML5 markup
  • BEM CSS Method
  • Mobile-first workflow
  • Flexbox

What I learned

I learned, use multiple image via the <picture></picture> markup

<picture>
    <source media="(max-width:640px)" srcset="image.jpg">
    <source media="(min-width:640px)" srcset="big-image.jpg">
    <img src="defaut/image.jgp" alt="Image description" style="width:auto">
</picture>

Useful resources

  • MDN Web Docs - This helped me for use markup <picture></picture>

Author