Transitions
HC · Animations & Transitionssyntax
transition: property duration timing-function delay;
transition: all 0.3s ease;example
.button {
background: #2563eb;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.button:hover {
background: #1d4ed8;
transform: translateY(-1px);
}
/* Transition specific properties for performance */
.card {
transition: box-shadow 0.2s ease, transform 0.3s ease;
}Note Prefer transitioning specific properties rather than using 'all' since transitioning everything can cause unexpected side effects and reduced performance. Stick to transform and opacity for the smoothest animations (they are GPU-accelerated).