3D transforms add depth effects using perspective and Z-axis transformations.
3D essentials
perspectiveon parent context.transform: rotateY()/rotateX()/translateZ().transform-style: preserve-3dfor nested 3D children.
A11y warning
Aggressive 3D motion can trigger vestibular discomfort; always provide reduced-motion fallbacks.
Important interview questions and answers
- Q: Why does 3D effect look flat sometimes?
A: Missing perspective context or flattening due to transform-style settings. - Q: Key performance concern with 3D transforms?
A: Excessive layers and heavy composition on lower-end devices. - Q: Safe use case for 3D transforms?
A: Small, optional micro-interactions with subtle depth.
Practice: Change one property in the playground and observe cascade + layout in DevTools.