Search code examples
csscss-transitionscss-transforms

CSS transforms VS transitions


What are the key differences between CSS transformations and transitions?

Both of those are used to change the current shape/state of an object. (you can do pretty animations with JS etc..)

But it's still not clear to me which one to use where and for what.


Solution

  • They're completely different things.

    Transitions:

    CSS Transitions allows property changes in CSS values to occur smoothly over a specified duration.

    Transforms:

    CSS transforms allows elements styled with CSS to be transformed in two-dimensional or three-dimensional space.