CSS 2D transforms
Despite sounding similar to CSS transitions, CSS transforms are entirely different. As we already established, transitions deal with the transition from one state to another. Transforms, on the other hand, are a means of defining what the state should actually be.
My own (admittedly childish) way of remembering the difference is like this: imagine a Transformer robot like Optimus Prime. When he has changed into a truck, he has transformed.
However, the period between robot and truck is a transition (he’s transitioning from one state to another). Obviously, if you have no idea who or what Optimus Prime even is, feel free to mentally discard the last few sentences. Hopefully, all will become clear when we get to the examples in a moment.
There are two groups of CSS transforms available: 2D and 3D. 2D variants are probably a little more straightforward, so let’s look at those first. The CSS 2D Transforms Module allows us to use the following...