SyntaxStudy
Sign Up
CSS The transition-property
CSS Beginner 4 min read

The transition-property

transition-property

transition-property specifies which CSS property to animate. Use all to animate every changing property, or list specific properties for better performance.

Example
/* Animate only background-color */
.box {
  transition-property: background-color;
}

/* Animate background and transform */
.card {
  transition-property: background-color, transform;
}

/* Animate everything (less performant) */
.element {
  transition-property: all;
}
Pro Tip

Avoid transition: all in production — it may animate unexpected properties and causes performance issues.