# transform-style

> The `transform-style` CSS property specifies how nested elements are rendered in 3D space.

## What does transform-style: preserve-3d do in CSS?

The property that specifies how nested elements are rendered in 3D space. It can be set to 'flat' to flatten child elements or 'preserve-3d' to maintain their 3D positioning, affecting how transformations are applied to nested elements.

- Topic: Transformations
- Type: property
- Browser support: Chrome 36+, Chrome Android 36+, Edge 12+, Firefox 16+, Firefox Android 16+, Safari 9+, Safari iOS 9+

## Example

Wrong:

```css
.card {
  transform-style: preserve-3d;
  overflow: hidden;
}
```

Right:

```css
.card {
  transform-style: preserve-3d;
}
.card-face {
  overflow: hidden;
}
```

`overflow: hidden` on the 3D parent forces it flat, so clipping moves to the faces instead.

## Common mistakes

- A card flip looks flat because `overflow: hidden` on the card flattens its children.

## Key points

- `transform-style: preserve-3d` is set on the parent whose children are placed in 3D.
- That parent has no `overflow: hidden`, `filter` or `opacity` below 1, since they flatten the 3D context.
- An ancestor sets `perspective`, so the depth is visible.

## Interview questions

### Is transform-style inherited?

No. Each nesting level that must stay in 3D needs its own `preserve-3d`.

### What is the default value of transform-style?

'flat', so children are drawn into the plane of their parent.

## Related cards

- [perspective](https://wonderium.dev/css/perspective-property.md)
- [backface-visibility](https://wonderium.dev/css/backface-visibility.md)
- [transform](https://wonderium.dev/css/transform.md)
- [rotateY()](https://wonderium.dev/css/rotate-y.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/transform-style
- Last updated: 2026-11-25
