Giter Site home page Giter Site logo

weather-forecast's Introduction

Weather forecast

⚠️ Don't forget to fork this repository before you start ⚠️

Before we start with JavaScript, let's first finish styling the site by centering the content in the middle of the page like this: Centered content in app

Hint

  • Is the box the right size? Does it need to be bigger or smaller?
  • Using grid, explore the justify-content and align-items

The goal of this exercise is to change the background colour of the app and the corresponding descriptive text depending on the temperature. These are the following conditions:

  • If the temperature is 20 degrees or higher:

    • The colour of the background should be #fab1a0
    • The text should read Yikes! It's too hot 🔥.
  • If the temperature is 0 - 19 degrees:

    • The colour of the background should be #55efc4
    • The text should read It's just right 👍.
  • If the temperature is -1 degrees or below:

    • The colour of the background should be #74b9ff
    • The text should read Brr! It's too cold ❄️.

Hint

  • Think about how we get elements from the Document Object Model (DOM)
  • To update any CSS property on an element, you can manipulate it through the style property on that DOM object
    • (e.g. someElement.style.maxWidth = '50%';)
  • To update the text of an element, you can manipulate it through the innerText property
    • (e.g. someElement.innerText = "hello")

weather-forecast's People

Contributors

bettymakes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.