0
0
CSSmarkup~20 mins

Transition timing functions in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Transition Timing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What does the ease-in timing function do in CSS transitions?
Choose the best description of how the ease-in timing function affects the speed of a transition.
AThe transition starts slowly and then speeds up towards the end.
BThe transition starts quickly and then slows down towards the end.
CThe transition moves at a constant speed from start to finish.
DThe transition starts and ends slowly with a faster middle phase.
Attempts:
2 left
💡 Hint
Think about the word 'in' as the start of the transition.
📝 Syntax
intermediate
2:00remaining
Which CSS code correctly applies a cubic-bezier timing function for a transition?
Select the CSS snippet that correctly uses a cubic-bezier timing function to make a transition ease in and out.
CSS
div {
  transition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1);
}
Atransition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1);
Btransition: all 0.5s cubic-bezier(0.42 0 0.58 1);
Ctransition: all 0.5s cubic-bezier(0.42, 0, 0.58);
Dtransition: all 0.5s cubic-bezier(0.42, 0, 0.58, 1, 0);
Attempts:
2 left
💡 Hint
Remember the syntax requires commas between the four numbers.
rendering
advanced
2:00remaining
What visual effect will this CSS produce on a button hover?
Given the CSS below, what will the user see when they hover over the button?
CSS
button {
  background-color: blue;
  transition: background-color 1s ease-out;
}
button:hover {
  background-color: green;
}
AThe button background color changes slowly at first, then speeds up to green.
BThe button background color changes quickly at first, then slows down to green.
CThe button background color changes instantly to green with no transition.
DThe button background color changes at a constant speed to green.
Attempts:
2 left
💡 Hint
Think about what ease-out means for the speed of the transition.
selector
advanced
2:00remaining
Which CSS selector targets elements with a transition timing function of linear?
Assuming you want to style only elements that have a transition-timing-function set to linear, which selector is valid?
A:is(transition-timing-function: linear)
B:has(transition-timing-function: linear)
C[transition-timing-function='linear']
D[style*='transition-timing-function: linear']
Attempts:
2 left
💡 Hint
Think about how to select elements by inline style attribute content.
accessibility
expert
2:30remaining
How can you ensure a CSS transition with a timing function does not cause accessibility issues for motion-sensitive users?
Which approach best respects users who prefer reduced motion when using CSS transitions with timing functions?
AUse only <code>linear</code> timing functions to avoid motion issues.
BAdd <code>aria-hidden="true"</code> to elements with transitions.
C@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
DIncrease transition duration to make motion less noticeable.
Attempts:
2 left
💡 Hint
Think about how CSS can detect user preferences for reduced motion.