DEV Community

Discussion on: CSS TRANSITION PROPERTY

Collapse
 
mrtoxas profile image
mrtoxas

And then if you add another transition, we'll go crazy. And why do you set the duration for all background properties, if you only change the color?

/* transition-property:all; */
transition-property: background-color, transform;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
rashidyaqoob profile image
rashidyaqoob

we are changing rotate property as well..

Collapse
 
mrtoxas profile image
mrtoxas • Edited

Yep, but with the transition-property:background, you set the duration not only for changing the color, but also for background-position and background-size. background is shorthand css-property.
We must be careful and apply duration only to the properties that we change.