Skip to content

Instantly share code, notes, and snippets.

@BobGu
Created June 3, 2017 14:12
Show Gist options
  • Save BobGu/1f28d90feb5f8677724d974bfa354ef2 to your computer and use it in GitHub Desktop.
Save BobGu/1f28d90feb5f8677724d974bfa354ef2 to your computer and use it in GitHub Desktop.

What is CSS?

  • Is used for styling the webpage we just built
  • Zen Garden

Styling elements

  • Selector, property, value.

Try it adding color

Pseudo-Selector

  • Lets us define specific rules on how to style something based off of something like if the mouse is hovering over the element. Or if that element has been clicked on.

Try it pseudo selector

Problem - Here come classes and IDs

  • What if we had multiple

    tags and we wanted to make some of them blue and some of them green?

  • We can add an ID attribute to any tag, this will allow us to select the name of that ID with our selector.
  • Show them.
  • ID are unique.
  • What if we had multiple elements on our page we wanted to style?(Give example or show)
  • We use a class
  • Show them

Try it adding classes and IDs

Transitions and Transformations

  • We can add motion to our webpage using CSS
  • We do this with the transform and the transformation properties
  • Transformations and transitions when paired together can be super fun!

Try it transformation properties

CFU - Ask everyone

  • Why do we use CSS?
  • What is a pseduo-selector?
  • What is and ID, when do we use it?
  • What is a class?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment