0
0
CSSmarkup~5 mins

Animation duration and delay in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does animation-duration control in CSS animations?

animation-duration sets how long one cycle of the animation takes to complete.

For example, animation-duration: 2s; means the animation runs for 2 seconds.

Click to reveal answer
beginner
What is the purpose of animation-delay in CSS?

animation-delay sets how long the browser waits before starting the animation.

For example, animation-delay: 1s; means the animation starts 1 second after the element appears.

Click to reveal answer
beginner
How do you write an animation that lasts 3 seconds and starts after 2 seconds?
animation-duration: 3s;
animation-delay: 2s;

This means the animation waits 2 seconds, then runs for 3 seconds.

Click to reveal answer
intermediate
Can animation-delay have negative values? What happens if it does?

Yes, animation-delay can be negative.

A negative delay means the animation starts partway through, as if it already ran for that time.

For example, animation-delay: -1s; starts the animation 1 second in.

Click to reveal answer
beginner
If you want an animation to start immediately and run for half a second, what values do you use?
animation-delay: 0s;
animation-duration: 0.5s;

This means no waiting and a quick animation.

Click to reveal answer
What does animation-duration specify?
AHow many times the animation repeats
BHow long before the animation starts
CHow long the animation runs each cycle
DThe speed of the animation in frames per second
If you want an animation to wait 3 seconds before starting, which property do you use?
Aanimation-wait: 3s;
Banimation-duration: 3s;
Canimation-start: 3s;
Danimation-delay: 3s;
What happens if animation-delay is set to -2s?
AAnimation starts immediately but 2 seconds into the animation
BAnimation starts 2 seconds late
CAnimation does not run
DAnimation runs twice as fast
Which unit is valid for animation-duration?
Aem
Bseconds (s)
Cpercent (%)
Dpixels (px)
If you want an animation to start immediately and last 1 second, what is the correct CSS?
Aanimation-delay: 0s; animation-duration: 1s;
Banimation-delay: 1s; animation-duration: 0s;
Canimation-delay: 1s; animation-duration: 1s;
Danimation-delay: 0s; animation-duration: 0s;
Explain how animation-duration and animation-delay work together in CSS animations.
Think about waiting time and running time for an animation.
You got /4 concepts.
    Describe a real-life example where you might want to use animation-delay in a web page.
    Imagine how animations appear one after another on a page.
    You got /3 concepts.