Hi, I’m Victor.
•I make websites for a living.
•Yes, I’m in high school.
Slide 3
Slide 3 text
What is an animation?
•A change from one style to another.
Slide 4
Slide 4 text
What is an animation?
•A change from one style to another.
• Properties
• Transitions
• Keyframes
Slide 5
Slide 5 text
Properties
•Attributes of an element being changed
Color
Slide 6
Slide 6 text
Properties
•Attributes of an element being changed
Color
Slide 7
Slide 7 text
Properties
•Attributes of an element being changed
Color Shape
Slide 8
Slide 8 text
Properties
•Attributes of an element being changed
Color Shape
Slide 9
Slide 9 text
Properties
•Attributes of an element being changed
Position
Color Shape
Slide 10
Slide 10 text
Properties
•Attributes of an element being changed
Position
Color Shape
Slide 11
Slide 11 text
Properties
•Attributes of an element being changed
• Size
• Rotation
• Opacity
• (and so on)
Slide 12
Slide 12 text
Transition
•How the properties will animate
• http://codepen.io/LabLayers/pen/MwzgNB
•Full list:
• http://easings.net/
•Why is this important?
• Cars
• Tennis balls
Slide 13
Slide 13 text
Keyframes
•Steps of attributes (and sometime transitions)
• At 0%, move down
• At 25%, move right
• At 50%, move up
• At 75%, move left
Slide 14
Slide 14 text
Keyframes
•Steps of attributes (and sometime transitions)
• At 0%, move down and turn green
• At 25%, move right and turn blue
• At 50%, move up and turn purple
• At 75%, move left and turn red
Slide 15
Slide 15 text
What is an animation?
•A change from one style to another.
• Properties
• Attributes of an element being changed
• Transitions
• How the properties will animate
• Keyframes
• Steps of attributes (and sometime transitions)
Slide 16
Slide 16 text
Put it together and you’ll get…
Slide 17
Slide 17 text
No content
Slide 18
Slide 18 text
Animating Elements in CSS
•It’s not that hard (really!)
Slide 19
Slide 19 text
Animating Elements in CSS
•It’s not that hard (really!)
• Properties
• Attributes of an element being changed
• Transitions
• How the properties will animate
• Keyframes
• Steps of attributes
Slide 20
Slide 20 text
Translation into CSS
•It’s not that hard (really!)
• Properties
• Standard CSS properties like color: red
• Transitions
• transition: all 500ms linear;
• Keyframes & Animations
• @keyframes myAnimation { }
• animation: myAnimation;
Slide 21
Slide 21 text
CSS Transition Syntax
transition: color 200ms linear 500ms;
transition-property: color;
transition-duration: 200s;
(transition-timing-function: linear;)
(transition-delay: 500ms;)
CodePen Follow-Along
• Start here:
• http://tiny.cc/csstransitions
• End result:
• http://tiny.cc/csstransitions2
• Click the icon in the bottom right hand corner to toggle display mode
Chrome Developer Tools
• Great for debugging Javascript & CSS
• Right an element with an animation
and select Inspect Element
• On the right Styles pane, you can slow
all animations or change the curve
Where I Use CSS Animations
• http://brainitch.com/ers/
• http://booksmart.it/
• https://everfreenw.com/archive/2015/everfree-northwest-
2015/index.html
• https://chrome.google.com/webstore/detail/harlem-shake-
the-web/ldejkceiibdbkgjfiagpjhjdadgkelib?hl=en
Advice for Beginners
• https://www.youtube.com/watch?v=E1oZhEIrer4