About this tool
Move, rotate, scale and skew an element with sliders and see the result over a faded outline of the original position. Switch on 3D to tilt the element around the X and Y axes with perspective, and click a dot to set the transform-origin, the point everything rotates and scales around.
Order matters
Transform functions are applied from right to left, each one in the coordinate system the previous ones left behind. rotate(45deg) translateX(100px) moves the element diagonally; translateX(100px) rotate(45deg) moves it right, then spins it in place. This generator uses the common order: translate, rotate, scale, skew.
Individual transform properties
Modern CSS also has separate translate, rotate and scale properties. They always apply in the same order (translate, then rotate, then scale), and you can change or animate one without repeating the others: a hover effect can set scale: 1.05 without overriding a rotation set elsewhere. Skew has no individual property, so it stays in transform.
The matrix
Every 2D transform combination reduces to one matrix(a, b, c, d, e, f), and 3D ones to matrix3d() with 16 values. Browsers report computed transforms in this form (for example in getComputedStyle), so it helps to see both. Transforms don’t affect layout, so other elements don’t move out of the way, and animating them is smooth.
FAQ
How do I rotate an element in CSS?
Use transform: rotate(45deg), or the individual property rotate: 45deg. Positive values turn clockwise.
What does transform-origin do?
It sets the point the element rotates and scales around. The default is the centre; top left makes it pivot on its corner.
Why does the order of transforms matter?
Each function applies in the coordinate system left by the others, so rotating then translating moves the element along the rotated axis.
Why doesn’t my 3D rotation look 3D?
You need perspective, either perspective() in the transform or the perspective property on the parent. Without it, rotating around X or Y just squashes the element.
Do transforms affect layout?
No. The element keeps its original space in the layout and other elements don’t move, which is why transforms animate smoothly.