CSS transitions, online
Six activities your students do on their own devices. See who's finished, and their scores.
CSS transitions in one minute
What students need to know
The keyword 'all' tells the browser to trigger a transition layout for any updated property. The 'linear' option creates an animation curve with uniform progression velocity.
The transition property configures animations for property changes, while transform modifies coordinates. CSS time values require an explicit unit descriptor like 's' for seconds.
Mistakes students make
- Line 1 is incorrect because CSS declarations must separate properties from values using a colon (:), not an equals sign (=).
- Line 2 is incorrect because transition-duration requires a time unit such as 's' (seconds) or 'ms' (milliseconds). A unitless number is invalid.
- Line 0 is incorrect because style rules like transition must be declared inside the selector's opening curly brace.
- Line 3 is incorrect because the property name is singular: transition-delay, not transition-delays.
What students will learn in this module
Every question in Module 61
Quick questions
- Which shorthand property creates smooth property changes over a specified duration?AtransitionBtransform
- Is transition-duration: 3; a valid declaration for a 3-second transition?ANo, it must end with 's' or 'ms'BYes, unitless numbers default to seconds
- Which property defines the pace or acceleration curve of a transition effect?Atransition-timing-functionBtransition-rate-modifier
- What happens if transition-duration is completely omitted from a transition configuration?AIt defaults to 1s and animates normallyBIt defaults to 0s and executes instantly
- Can you configure a delay before a transition animation starts using transition-delay?ANoBYes
Key terms
Students type the meaning of:
transition
Match the pairs
transition: opacity 0.5s;Match it to what it doestransition-delay: 2s;Match it to what it doesSpecifies that all animatable properties will transition smoothly.Match it to what it doesConfigures a transition to maintain a constant speed from start to end.Match it to what it doestransition: width 2;Match it to what it doestransition-duration: ease-in;Match it to what it doesFill in the blanks
.box { __________: opacity 2s; }Hint: Type the shorthand property name to create a transition
.card { ___________________: 0.5s; }Hint: Type the property that specifies how many seconds a transition takes
.btn { ___________________: transform; }Hint: Type the property used to explicitly name the CSS feature to transition
.link { ________________: 1s; }Hint: Type the property used to define a pause before the transition begins
.panel { transition-timing-function: ____; }Hint: Type the keyword for a slow start and end acceleration curve
Spot the error
Question 1
A.item {B transition = width 1s;C background: red;D}
Question 2
A.img {B width: 200px;C transition-duration: 0.5;D opacity: 1;E}
Question 3
A.nav transition: color 0.2s; {B background: black;C}
Question 4
A.alert {B opacity: 0;C transition: opacity 1s;D transition-delays: 0.5s;E}
Question 5
A.badge {B transitioning: transform 2s;C transform: scale(1.1);D}
