2D Translate Transform
The translate transform function moves an element from its normal position without affecting document flow. Other elements do not reflow when a translated element moves.
Syntax
transform: translate(x, y) — moves both axes. translateX(x) and translateY(y) move a single axis. CSS also provides the standalone translate property (no function wrapper needed).
Units
Accepts any length unit. Percentages are relative to the element's own size (not the parent), making translate(-50%, -50%) perfect for centring.
Performance
Translate is GPU-accelerated — it triggers compositing rather than layout or paint, making it ideal for animations.