Toolstia / CSS transform generator
CSS transform generator
Set how far to move, rotate, scale and skew an element and see the effect instantly on a sample box. Copy the exact transform property, with transform-origin when you change it.
Transforms are applied in the order shown: move, then rotate, then scale, then skew. Changing the order changes the result, so keep that in mind if you edit the CSS by hand. The dashed box clips the preview, so very large values may look cut off.
How it works
- Enter values for move, rotate, scale and skew.
- Choose the transform origin.
- Copy the CSS.
Order matters
The output applies move, rotate, scale and skew in that order. Reordering the functions in your own CSS can give a different picture.
Origin
Rotation and scaling happen around the transform origin, which is the centre by default. A corner origin makes the box swing like a door.
Skip the defaults
Values that do nothing, such as a zero move or a scale of 1, are left out so the CSS stays short.
Performance
Transforms are smooth to animate because browsers can run them on the graphics chip.
Questions
Does it change layout?
No. Transforms move how an element is drawn but not the space it takes in the layout. Everything happens in your browser, and nothing you enter is sent anywhere.
Can I use percentages?
Not here. This tool uses pixels and degrees, which cover most needs.
What does scale 1.5 do?
It makes the element one and a half times larger in both directions.