The perspective-origin property sets the vanishing point for a 3D scene. Use it with perspective to control how rotations and depth are perceived.
01
Vanishing Point
Viewer position.
02
X and Y
Two coordinates.
03
50% 50%
Default center.
04
Keywords
top, left, right.
05
Parent Scene
With perspective.
06
3D UI
Cards & panels.
Fundamentals
Introduction
The perspective-origin property in CSS is used to define the origin point of the perspective view for a 3D transformed element.
This property controls the position from which the viewer perceives the depth and perspective of the element, affecting how 3D transformations such as rotations and translations appear.
Definition and Usage
Set perspective-origin on the same parent element that has perspective. That parent creates the 3D scene; children inside it use transforms like rotateY() or rotateX().
Moving the origin to a corner or edge changes the angle of the 3D effect, similar to moving your head while looking at a rotating card.
💡
Beginner Tip
perspective-origin does not replace perspective. You need both on the parent: distance from perspective, vanishing point from perspective-origin.
Foundation
📝 Syntax
The syntax for the perspective-origin property allows you to specify the position in 2D space. It can take either two values for the X and Y coordinates or a single value for the X coordinate with the Y coordinate defaulting to 50%.
syntax.css
element{perspective-origin:x-axisy-axis;}
x-axis — Specifies the horizontal position of the perspective origin. This can be a length (e.g., 50px) or a percentage (e.g., 50%).
y-axis — Specifies the vertical position of the perspective origin. This can also be a length or a percentage.
The perspective origin is set to the top-right of the .container. The perspective property on the same parent ensures the 3D effect is visible on the rotated .box.
Example 2 — Center vs Left Origin
Compare the default center origin with left center using the same rotation on both cards.
The parent gets perspective so children can render in 3D.
perspective
2
You set the vanishing point
perspective-origin moves the viewer’s focal point across the parent.
origin
3
Children transform in 3D
Rotations and translations are projected relative to that origin.
transform
=
👁
Directed 3D composition
Depth feels like it comes from a chosen corner, edge, or center point.
Compatibility
Browser Compatibility
The perspective-origin property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. However, be sure to test across different devices and browsers to confirm consistent behavior.
✓ 3D Transforms · Widely supported
Reliable perspective-origin support
Chrome, Firefox, Safari, Edge, and Opera support perspective-origin with perspective.
97%Modern browser support
Google Chrome36+ · Desktop & Mobile
Full support
Mozilla Firefox16+ · Desktop & Mobile
Full support
Apple Safari9+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera23+ · Modern versions
Full support
Testing tip
Compare origin positions on phones and desktops. A corner origin that looks good on desktop may feel too extreme on small screens.
perspective-origin property97% supported
Bottom line:perspective-origin is safe to use in modern 3D UI. Always pair it with perspective on the same parent.
Wrap Up
Conclusion
The perspective-origin property is essential for controlling the depth and perspective of 3D transformed elements.
By adjusting the perspective origin, you can influence how 3D transformations are perceived, allowing for more dynamic and visually interesting effects. Experiment with different values to see how the perspective changes and enhance the depth of your web designs.
Set perspective-origin on the same parent as perspective
Start with 50% 50% and adjust in small steps
Use keywords like top right for readable layout code
Match origin direction to your intended motion axis
Test 3D scenes on touch devices
❌ Don’t
Put perspective-origin only on the rotated child
Expect results without perspective on the parent
Confuse perspective-origin with transform-origin
Use extreme corner origins without checking readability
Overload pages with many competing 3D vanishing points
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about perspective-origin
Use these points when aiming your 3D scenes.
5
Core concepts
👁01
Vanishing Point
Viewer focal spot.
Purpose
⚙02
50% 50%
Center default.
Default
📏03
X and Y
Two coordinates.
Syntax
🖼04
Parent Scene
With perspective.
Pattern
p05
perspective
Viewing distance.
Companion
❓ Frequently Asked Questions
The perspective-origin property sets the vanishing point for a 3D scene. It controls where the viewer appears to be looking from on the element that has perspective applied.
Apply perspective-origin on the same parent element that has perspective, not on the child being rotated. The parent defines the 3D viewing context.
The default value is 50% 50%, which places the vanishing point at the center of the element.
Yes. Keywords such as left, right, top, bottom, and center work as position values, similar to background-position and transform-origin.
Yes. perspective-origin only affects elements that establish a 3D perspective context, which means you need perspective on the same parent element.