Upgrade to Pro — share decks privately, control downloads, hide ads and more …

(TH Crash Course) Advanced HTML & CSS

(TH Crash Course) Advanced HTML & CSS

Ryhan Hassan

January 18, 2013
Tweet

More Decks by Ryhan Hassan

Other Decks in Programming

Transcript

  1. <img src=“foo”/> <style> img{ -webkit-transition: all 0.5s; top: 0px; }

    img:hover{ top: 10px; } </style> Transition from 0px to 10px
  2. Exercise 1 1. Download starter code at github.com/ryhan/htmlDemos 2. Open

    up /demos/transitions.html 3. Add a 7th troll face, and animate it.
  3. <img src=“foo”/> <style> img{ -webkit-animation: bar linear 1s infinite; }

    @-webkit-keyframes bar{ 0%{ left: 0;} 50%{ left: 100px;} 100%{ left: 0;} } </style>
  4. Exercise 2 1. Open up /demos/animations.html 2. Add a 2nd

    cat, and animate it with a keyframe animation
  5. Exercise 2 1. Open up /demos/animations.html 2. Add a 2nd

    cat, and animate it with a keyframe animation Exercise 2.5 1. Download more starter code at github.com/ryhan/Bounce
  6. 3D Transforms -webkit-transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); Set how far away

    we are (scene) -webkit-perspective: 1000px; Preserve Depth (object) -webkit-transform-style: preserve-3d;
  7. Viewport Set Page Width Disable Zooming Set Zoom Level <meta

    name=“viewport” content = “ width = device-width, user-scalable = no, initial-scale = 1.0” />
  8. Responsive Design Reflow content to fit any screen. <link rel='stylesheet'

    href='../css/mobile.css' media='screen and (max-width: 600px)' /> <link rel='stylesheet' href='../css/normal.css' media='screen and (min-width: 600px)' />