CSS transform-style

asiqurr's avatar
Published Jul 30, 2021Updated Sep 3, 2021
Contribute to Docs

The transform-style property specifies if an element’s children are positioned in 3D space or flattened.

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • In this CSS tutorial, you’ll learn how to add CSS to visually transform HTML into eye-catching sites.
    • Beginner Friendly.
      6 hours

Syntax

transform-style: <value>;

The transform-style property can have one of two values:

  • preserve-3d: The children of an element will be positioned in 3D space.
  • flat: The children of an element will not be positioned in 3D space.

Example 1

Preserving the 3D space of a div element’s children elements.

div {
transform-style: center;
}

All contributors

Contribute to Docs

Learn CSS on Codecademy

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • In this CSS tutorial, you’ll learn how to add CSS to visually transform HTML into eye-catching sites.
    • Beginner Friendly.
      6 hours