Move
Rotate
Scale and skew
Anchor point
Everything rotates and scales around this point. Move it to a corner and a rotation swings instead of spinning.
Move, rotate, scale and skew an element in 2D or 3D.
Move
Rotate
Scale and skew
Anchor point
Everything rotates and scales around this point. Move it to a corner and a rotation swings instead of spinning.
The transform property moves, turns, resizes and slants an element without disturbing anything around it. That last part is the whole point. A transformed element leaves its original space in the layout untouched, so nothing reflows and the browser can hand the work to the GPU. It is why transforms are the right tool for animation and margins are not.
Writing one by hand is fiddly because the functions are order dependent and 3D needs a perspective value before it looks like anything. This tool gives every function a slider, shows the result on a real element, and warns you when you've asked for a 3D rotation with no perspective set, which is the single most common reason a flip looks flat.
Transforms turn up wherever something needs to move without the page moving with it.
backface-visibility: hidden.translate(-50%, -50%) on an absolutely positioned element, still the shortest way to center something of unknown size.Animating what you build here? Pair it with the CSS Box Shadow Generator for the lift, or reshape the element first with the CSS Border Radius Generator. Or browse all our free developer tools.
Yes, and it catches people out constantly. Transforms apply right to left, each one operating in the coordinate space the previous one left behind. rotate(45deg) translateX(100px) moves the element 100px along its own rotated axis, so it ends up diagonally offset. translateX(100px) rotate(45deg) moves it 100px right, then spins it in place. This tool always writes the functions in a consistent order, so what you see in the preview is what the code produces.
Because there's no perspective. Without it the browser projects the element orthographically, so a Y rotation just squashes it horizontally instead of turning away from you. Set a perspective value and depth appears. Lower numbers mean a more extreme, wide-angle effect; 800px to 1200px looks natural for a card.
Both work, and they do different things. The perspective() function inside transform, which is what this tool generates, applies a vanishing point to that one element. The perspective property on a parent gives all its children a shared vanishing point, so a row of cards tilts as though you're looking at one scene. Use the property on the parent when several elements need to feel like they're in the same space.
It moves the point everything pivots and scales around. The default is the center of the element. Set it to 0% 0% and a rotation swings from the top left corner like a hinge, and a scale grows out from that corner rather than in all directions. It's the difference between a door opening and a record spinning.
They're the best option, along with opacity. Because a transform doesn't affect layout, the browser can skip layout and paint work and composite the change on the GPU, which is what keeps an animation at 60fps. Animating left, top, width or margin forces a layout recalculation on every frame and is the usual cause of jank.
Yes. Switch the format above the code and you get an arbitrary-value class holding the whole transform. Tailwind does ship separate utilities for rotate, scale and translate, but they compose through its own CSS variables, so for a multi-function transform like the ones here a single arbitrary value is more predictable.