0
0
CSSmarkup~20 mins

Transition property in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Transition Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
What does the CSS transition property do?
Choose the best description of what the transition property controls in CSS.
AIt specifies the order in which CSS rules are applied.
BIt controls the speed of JavaScript event handlers.
CIt defines how CSS properties change smoothly over time when their values change.
DIt sets the delay before a CSS animation starts running.
Attempts:
2 left
💡 Hint
Think about how colors or sizes can change gradually on hover.
📝 Syntax
intermediate
1:30remaining
Which CSS transition shorthand is correct?
Select the correct CSS syntax for a transition that changes the background-color over 0.5 seconds with ease-in timing.
Atransition: background-color 0.5s ease-in;
Btransition: 0.5s background-color ease-in;
Ctransition: ease-in 0.5s background-color;
Dtransition: background-color ease-in 0.5s;
Attempts:
2 left
💡 Hint
The order is: property, duration, timing-function.
rendering
advanced
2:00remaining
What will you see when hovering over this box?
Given the CSS below, what visual effect happens when you hover over the box?
CSS
div {
  width: 100px;
  height: 100px;
  background-color: blue;
  transition: width 1s ease;
}
div:hover {
  width: 200px;
}
AThe box smoothly grows wider from 100px to 200px over 1 second on hover.
BThe box instantly changes width to 200px with no animation on hover.
CThe box smoothly changes background color from blue to another color on hover.
DNothing changes visually when hovering over the box.
Attempts:
2 left
💡 Hint
Look at which property is listed in the transition and what changes on hover.
selector
advanced
1:30remaining
Which CSS selector applies a transition only to links inside a nav element?
Choose the selector that applies a transition effect only to <a> elements inside a <nav>.
Anav > a { transition: color 0.3s ease; }
Ba nav { transition: color 0.3s ease; }
Ca > nav { transition: color 0.3s ease; }
Dnav a { transition: color 0.3s ease; }
Attempts:
2 left
💡 Hint
Think about how to select all links inside a nav, not the other way around.
accessibility
expert
2:00remaining
Why should you be cautious using transition on prefers-reduced-motion users?
What is the best practice regarding CSS transitions for users who prefer reduced motion?
AUse JavaScript to force animations regardless of user settings.
BDisable or reduce transitions to avoid triggering motion sensitivity.
CIgnore user preferences and always apply transitions for consistency.
DIncrease transition durations to make animations more noticeable.
Attempts:
2 left
💡 Hint
Consider users who get dizzy or uncomfortable with animations.