How can you ensure that a CSS transition applies only when a specific property changes?

  • By using the transition property without specifying any properties.
  • By using the all value for the transition-property property.
  • By creating a separate CSS class for each property you want to transition.
  • By defining multiple transition rules for each property.
To ensure that a CSS transition applies only when a specific property changes, you can use the transition-property property and set it to "all." This means the transition will be applied to all properties that change. If you want to target specific properties, you can list them individually in the transition-property property. Using "all" is a convenient way to apply transitions to all changing properties.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *