transform-style
Transform and motion
Decides whether children keep their 3D positions or get flattened.
| How to write it | transform-style: flat; |
|---|---|
| Common values | flat, preserve-3d |
| Inherited | No — it stops at this element |
| Category | Transform and motion |
How to read this
- An inherited property only needs writing once on the parent — every child picks it up. Most text properties work this way.
- A shorthand resets whatever you leave out. Writing background: red alone also wipes a background image you set earlier.
- When rules collide, the more specific selector wins; only when specificity ties does source order decide.
- Animate transform and opacity for smoothness. Changing width or top forces the layout to be recalculated.
Frequently asked questions
Q. What is the CSS transform-style property?
Decides whether children keep their 3D positions or get flattened.
Q. How do you write transform-style?
As transform-style: flat; Common values include flat, preserve-3d.
Q. Is transform-style inherited?
No. It applies only where you write it, so each element needs its own declaration.
Q. What group does transform-style belong to?
The transform and motion group.