Account
Categories
Shobha
Shobha
The best way to predict the future is to invent it

What is the difference between transitions and animations?

Transitions define how property changes happen on events (like hover), while animations allow keyframe-based changes over time.
For example,

p { color: purple; } /* Specificity: 1 */
.button { color: orange; } /* Specificity: 10 */
#page-header { color: red; } /* Specificity: 100 */

/* Inline styles take priority: */
style="color: yellow;" /* Specificity: 1000 */