Transitions
Can do drop down menus, flip card
Simplest
Transition-property: props that transition
Transition-duration: time it takes, s or ms
Transition-timing-function: bezier curve
Transition delay: time until starts (good for hover if someone just moves past it)
Transition: shorthand for 4
Example
50ms delay good b/c if someone drag their mouse across screen
Could also
But transform change z so stuff below doesnt move
Transition Usage
Can transition between anything you can have a midpoint with i.e gradient values not discrete i.e font-size/opacity vs display/height auto
Order can matter if multiple style blocks have same specificity(i.e valid/invalid and hover which applies when you hover and are valid)
Transitionend event
Event thrown only when transition completes for every property
Last updated