Transitioning Multiple Properties
Apply transitions to multiple CSS properties simultaneously using comma-separated values.
Transitioning Multiple Properties is a free CSS Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the CSS Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Why Multiple Property Transitions?
Real UI interactions often involve several properties changing simultaneously — background color, shadow, and scale on hover. CSS supports independent easing and duration per property.
Comma-Separated Transitions
List multiple transitions with a comma. Each entry applies to one property independently:
.card {
transition:
transform 200ms ease,
box-shadow 200ms ease,
background-color 300ms ease;
}Different Durations Per Property
Give each property a different speed for a layered, natural feel:
.btn {
transition:
background 150ms ease, /* fast color change */
transform 250ms ease, /* slightly slower lift */
box-shadow 250ms ease;
}Different Easings Per Property
Mix easing functions to make each property feel appropriate:
.modal {
transition:
opacity 200ms ease-out, /* fade-in fast */
transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1); /* spring */
}transition: all Drawbacks
Using transition: all means every changing property gets the same timing. This can cause unwanted animations on properties that should snap (like display or position changes).
Interruptible Transitions
CSS transitions are interruptible. If hover state ends mid-transition, the transition reverses from the current animated value, not from the final state. This produces smooth reversals without jarring jumps.
Coordinating Enter and Exit
Use different durations for hover-in vs hover-out by overriding transitions in the :hover state:
.card {
transform: scale(1);
transition: transform 300ms ease; /* slow exit */
}
.card:hover {
transform: scale(1.05);
transition: transform 150ms ease; /* fast enter */
}Staggering with Delay
Add increasing delays to sibling elements for a staggered reveal effect:
.item { transition: opacity 300ms ease, transform 300ms ease; }
.item:nth-child(1) { transition-delay: 0ms; }
.item:nth-child(2) { transition-delay: 60ms; }
.item:nth-child(3) { transition-delay: 120ms; }CSS Custom Properties for Stagger
Assign stagger delay from a CSS custom property set via JavaScript or HTML:
.item {
transition: opacity 300ms var(--ease-out) var(--stagger-delay, 0ms);
}Transition vs Animation
Use transitions for two-state changes (idle → hover). Use @keyframes animations for multi-step sequences, looping effects, or self-starting animations.
Will-change Optimization
Hint the browser about which properties will be animated to allow pre-optimization. Use sparingly — it consumes GPU memory.
.card {
will-change: transform, box-shadow;
transition: transform 200ms ease, box-shadow 200ms ease;
}Quick Check
A card has transition: background 150ms, transform 250ms on the base state. When hovered, what happens if the user quickly moves the cursor away mid-animation?
Recap
Comma-separated transitions allow each property to have its own duration, easing, and delay. Avoid transition: all — it can animate unintended properties. Transitions are interruptible and reverse smoothly from their current position. Use delays for staggered effects.
Frequently asked questions
Is the “Transitioning Multiple Properties” lesson free?
Yes — the full text of “Transitioning Multiple Properties” is free to read here on the web, and the CSS Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the CSS Academy course, upgrade to CoddyKit PRO.
What will I learn in “Transitioning Multiple Properties”?
Apply transitions to multiple CSS properties simultaneously using comma-separated values. You practise CSS Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start CSS Academy?
No prior experience is required. CSS Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Transitioning Multiple Properties” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this CSS Academy lesson?
Yes. Every CSS Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Transition Property Duration and Timing
- Easing Functions: ease linear cubic-bezier
- Transitioning Multiple Properties
- Performance: Transformable vs Repainting Props