CSS Tutorial

The language for styling web pages.

CSS 3D Transforms

CSS 3D Transforms

CSS 3D transforms allow you to transform elements in 3D space. You need to set a perspective on the parent element for 3D transforms to work.

3D Transform Functions:

  • rotateX(deg) - Rotate around X axis
  • rotateY(deg) - Rotate around Y axis
  • rotateZ(deg) - Rotate around Z axis
  • translateZ(px) - Move along Z axis
  • perspective(px) - Set viewing depth

Try It Yourself

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

Source Code
Result
Topics