Skip to content

Latest commit

 

History

History

00-fundamentals

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Lesson 0: Fundamentals

  • Why animate? Guidance and clarification, style and branding.
  • Duration: how long an iteration of an animation takes to complete.
  • Delay: how long it takes before an animation starts
  • Timing function: the easing of an animation
  • CSS Variables: custom properties that can be inherited by elements and set by JavaScript:
:root {
  --duration: 2s;
}

.thing {
  animation-duration: calc(var(--duration, 1s));
}
const thingEl = document.querySelector('.thing');

thingEl.style.setProperty('--color', 'green');

Resources