CSS Tutorial

The language for styling web pages.

CSS 2D Transforms

CSS 2D Transforms

CSS transforms allow you to move, rotate, scale, and skew elements in 2D space using the transform property.

2D Transform Functions:

  • translate(x, y) - Move element
  • rotate(deg) - Rotate element
  • scale(x, y) - Resize element
  • skew(x, y) - Tilt element
  • matrix() - Combine all transforms

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics