0
0
CSSmarkup~5 mins

Keyframe animations in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a keyframe animation in CSS?
A keyframe animation in CSS lets you change styles smoothly over time by defining specific points (keyframes) with different styles. The browser fills in the changes between these points.
Click to reveal answer
beginner
How do you define keyframes in CSS?
You use the @keyframes rule followed by a name and curly braces. Inside, you write percentages or keywords like from and to with style changes for each step.
Click to reveal answer
beginner
What does the animation-duration property do?
It sets how long the animation takes to complete one cycle, usually in seconds or milliseconds.
Click to reveal answer
intermediate
Explain the difference between from/to and percentage keyframes.
<code>from</code> is the same as 0% (start), and <code>to</code> is the same as 100% (end). Percentages let you add steps in between, like 50% for the middle of the animation.
Click to reveal answer
beginner
How can you make an animation repeat forever?
Use the animation-iteration-count property and set it to infinite.
Click to reveal answer
Which CSS rule is used to create keyframe animations?
A@frames
B@animation
C@keyframes
D@motion
What does animation-duration: 3s; mean?
AAnimation delays 3 seconds before starting
BAnimation starts after 3 seconds
CAnimation repeats 3 times
DAnimation runs for 3 seconds
How do you specify the middle point of an animation?
AUse 50% in @keyframes
BUse from
CUse to
DUse 100%
Which property makes an animation repeat forever?
Aanimation-iteration-count: infinite;
Banimation-repeat: forever;
Canimation-loop: always;
Danimation-count: forever;
What is the difference between from and to in keyframes?
AThey are not valid in keyframes
B<code>from</code> is 0%, <code>to</code> is 100%
CThey are the same and mean 50%
D<code>from</code> is 100%, <code>to</code> is 0%
Describe how to create a simple CSS animation that moves a box from left to right.
Think about defining start and end positions and telling the box to animate.
You got /3 concepts.
    Explain how you can control the speed and repetition of a CSS animation.
    Focus on properties that control time and loops.
    You got /3 concepts.