/stats-preview-card-component

Frontend Mentor challenge - https://www.frontendmentor.io/

Primary LanguageCSS

Frontend Mentor - Stats preview card component solution

This is a solution to the Stats 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

Screenshot

Desktop View

Desktop View

Mobile View

IPhone X

iPhone Screenshot

Galaxy S5

Galaxy S5 Screenshot

IPad

iPad View

IPad Landscape

iPad landscape

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS
  • Flexbox

What I learned

The major learning I got from this challenge is how to cover an image with a layer of color using just css.

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

<div class="image" role="img"></div>
.image {
    background-blend-mode: multiply;
    background-color: hsl(277, 64%, 61%);
    background-image: url(../images/image-header-desktop.jpg);
    background-position: center;
    background-size: cover;
    object-fit: fill;
    background-repeat: no-repeat;
    width: 50%;
}

Author