10. Transitions: smooth changes
Este artículo se traducirá automáticamente. Por ahora se muestra en inglés.
transition makes a change happen gradually instead of instantly. Give the property to animate, and a duration such as 0.3s.
Keep animations short and subtle. Respect users who prefer reduced motion.
Ver ejemplo
.card {
transition: transform 0.3s;
}
.card:hover {
transform: translateY(-4px);
}
✍️ Ahora te toca
Give .card a transition of background-color lasting 0.2s.