Instead of one transition with transitions, can have up to an infinite number of iterations, grandular control
animation-timing-function
animation-iteration-count
@keyframes clever_name_here ...
@keyframes writing {
from { /*same as 0%*/
left: 0;
}
to { /*same as 100%*/
left: 100%;
}
}
% basically the total animation time
!important not important in animations
It repaints the page when you change left/top, should use transform
Can have multiple animations happening on same element at same time, last declared animation overrides other props if same props
Timing Function
linear |ease-in-out|ease-in|ease-out|step-start|step-end|ease|steps(X, start|end)|cubic-bezier(x1, y1, x2, y2)
Discrete steps
start/end is which frame you drop i.e 2-4-6-8-10 or 0-2-4-6-8-10
Sprites(is a strip animate with:), add second animation to make it move across screen
Iteration-count
Can even do partial count so cuts off
Animation-delay
Can even do negative and skips in animation time
Animation-Direction
normal | alternate|reverse|alternate-reverse
Animation(shorthand)
name duration delay timing-function iteration-count
Animation Fill Mode
None | forwards | backwards | both
What do after last animation?
backwards: keep at 0% during animation delay/start
Running | paused
Can add and remove class of animation at animation end to restart event(put slight delay on regiving class)
On Unmount Animation