Challenge - 5 Problems
Animation Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate2:00remaining
What is the effect of this CSS animation code?
Consider the following CSS snippet:
What happens when the page loads?
@keyframes slide { from { left: 0; } to { left: 100px; } }
.box { position: relative; animation-name: slide; animation-duration: 2s; animation-delay: 1s; }What happens when the page loads?
CSS
@keyframes slide { from { left: 0; } to { left: 100px; } } .box { position: relative; animation-name: slide; animation-duration: 2s; animation-delay: 1s; }
Attempts:
2 left
💡 Hint
Think about what animation-delay does before the animation starts.
✗ Incorrect
animation-delay pauses the animation start by the specified time (1s here). After that, animation-duration (2s) controls how long the animation runs.
🧠 Conceptual
intermediate2:00remaining
How does animation-delay affect multiple animations on the same element?
Given this CSS:
Which statement is true?
.circle { animation-name: grow, fade; animation-duration: 2s, 3s; animation-delay: 1s, 0s; }Which statement is true?
CSS
.circle { animation-name: grow, fade; animation-duration: 2s, 3s; animation-delay: 1s, 0s; }
Attempts:
2 left
💡 Hint
Remember the order of values in animation-delay matches animation-name order.
✗ Incorrect
animation-delay values correspond to each animation in order. Here, 'grow' waits 1s before starting; 'fade' starts immediately with 0s delay.
❓ rendering
advanced2:00remaining
What will be the visible effect of this CSS animation timing?
Analyze this CSS:
What does the user see when the page loads?
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.light { animation: blink 4s infinite; animation-delay: 2s; }What does the user see when the page loads?
CSS
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } .light { animation: blink 4s infinite; animation-delay: 2s; }
Attempts:
2 left
💡 Hint
animation-delay delays the entire animation cycle start.
✗ Incorrect
The element stays fully visible during the 2-second delay, then the blinking animation starts cycling every 4 seconds.
❓ selector
advanced2:00remaining
Which CSS selector applies animation-delay only to buttons inside a nav?
You want to apply a 1.5s animation delay only to buttons inside a
Attempts:
2 left
💡 Hint
Think about the order and relationship between elements in selectors.
✗ Incorrect
The selector 'nav button' targets all button elements inside any nav element. Other options either reverse the order or use class incorrectly.
❓ accessibility
expert2:00remaining
How should animation-delay be used to improve accessibility?
Which practice helps users sensitive to motion when using animation-delay in CSS?
Attempts:
2 left
💡 Hint
Consider user preferences for reduced motion in settings.
✗ Incorrect
Using the prefers-reduced-motion media query allows disabling or simplifying animations and delays for users who prefer less motion, improving accessibility.