The perspective property sets the distance between the viewer and the z=0 plane. Put it on a parent. Children that use 3D transform values such as rotateY() then look foreshortened instead of flat.
Smaller lengths look stronger. Larger lengths look subtler. Move the vanishing point with perspective-origin. This property is not the same as the perspective() transform function, which applies depth to the transformed element itself.
Standard-track.
Not deprecated. Baseline widely available. A value other than none creates a stacking context and a containing block for position: fixed descendants.
Syntax
CSS Syntax
syntax.css
perspective:none | <length> | initial | inherit;
Lengths must be non-negative. Values under 1px clamp to 1px. Negative lengths are invalid.
perspective is a browser CSS property for 3D transforms. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since Sep 2015
perspective
Unprefixed: Chrome 36+, Firefox 16+, Safari 9+, Edge 12+, Opera 23+. Internet Explorer 10 supports the property. Older WebKit builds need a prefix.
97%Modern browser support
Google Chrome36+ · 12+ with -webkit-
Full support
Mozilla Firefox16+
Full support
Apple Safari9+ · 4+ with -webkit-
Full support
Microsoft Edge12+
Full support
Opera23+
Full support
Samsung Internet3+
Full support
Internet Explorer10+
Full support
perspectiveWidely supported
Bottom line: Safe for everyday use without prefixes in current browsers. Legacy WebKit needed -webkit-perspective. Internet Explorer 10 supports the property but has limited preserve-3d behavior for nested scenes.
Remember
Key Takeaways
Role: set viewing distance on a parent so children’s 3D transforms show depth.
Common values:none and lengths such as 500px.
Initial value:none. Not inherited.
Rule of thumb: smaller length → stronger effect; pair with perspective-origin when needed.
One line:perspective on the parent is what makes a child rotateY look 3D instead of flat.
Frequently Asked Questions
It sets how far the viewer sits from the z=0 plane. Children with 3D transforms such as rotateY then look foreshortened instead of flat.
Put it on the parent that frames the scene. The property creates a 3D viewing context for that element's children, not for the element itself.
The initial value is none. With none, 3D transforms on children look flat because no viewing distance is applied.
A short length such as 200px places the viewer closer to the scene, so the same rotateY looks more dramatic. A large length such as 1000px looks subtler.
No. The perspective property is set on a parent and affects children. The perspective() transform function applies depth to the transformed element itself.
It is Baseline and widely available since September 2015: Chrome 36+, Firefox 16+, Safari 9+, Edge 12+, IE 10+. It is a browser CSS property, not a Node.js feature.