rpad88 / interactive-pricing-component-main

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frontend Mentor - Interactive pricing component solution

This is a solution to the Interactive pricing 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 for the app depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Use the slider and toggle to see prices for different page view numbers

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • JavaScript

What I learned

I liked to learn how to set a linear-gradient to range input, it is important to have a visual effect.

if(myRange.value == 2) {
        let originalPrice = 12.00;
        price.innerHTML = printPrice(originalPrice);        
        views.innerHTML = '50K';
        //set background to linear-gradient color Green from 0% to 25%
        //set background to linear-gradient color Pale Blue from 25% to 100%
        myRange.style.background = 'linear-gradient(to right, hsl(174, 77%, 80%) 0% 25%, hsl(224, 65%, 95%) 25% 100%)';                
    }

If you want more help with writing markdown, we'd recommend checking out The Markdown Guide to learn more.

Continued development

I want to continue focusing on JavaSript, HTML and CSS in future projects to be a front-end developer.

Useful resources

Author

About


Languages

Language:CSS 60.2%Language:JavaScript 20.7%Language:HTML 19.1%