CSS perspective-origin Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The perspective-origin property sets the vanishing point for a 3D scene. Put it on the same parent that has perspective. Children with 3D transform values then foreshorten toward that point.

The default is 50% 50% (center). Keywords such as top, left, and bottom right work like other CSS position values. This is not transform-origin, which sets the pivot of the transformed element itself.

Standard-track.

Not deprecated. Baseline widely available. It only has a visible effect when the same element also has a perspective length (not none).

CSS Syntax

syntax.css
perspective-origin: <position> | initial | inherit;

One value sets X (Y becomes center). Two values set X then Y. Percentages resolve against the element’s width and height.

Property Values

ValueDescriptionTry it
centerDefault vanishing point (50% 50%)Try it
topX stays center; Y moves to the top edgeTry it
bottom rightVanishing point at the bottom-right cornerTry it
20% 80%Custom point with percentages (lengths allowed too)Try it
initialResets to 50% 50%Try it
inheritTakes the parent’s perspective-originTry it

How to Use perspective-origin

Set distance first, then aim the vanishing point.

  1. Put perspective on the parent scene (for example 500px).
  2. Add perspective-origin on that same parent.
  3. Give a child a 3D transform such as rotateY(45deg).
  4. Start with center, then try a corner or percentage until the skew matches the design.
PieceRequired?Role
perspective lengthYesCreates the 3D viewing distance
perspective-originOptionalAims the vanishing point (default center)
Child 3D transformYesSomething to foreshorten toward the origin
transform-originNoSeparate: pivot of the rotated child

Live Preview

Same card and perspective: 500px. Change only perspective-origin.

The vanishing point moves. Depth strength stays the same because perspective is fixed.

Scene

perspective-origin: center — Vanishing point in the middle.

CSS Examples

Each snippet focuses on perspective-origin. Use Try It Yourself for a live editor.

Example 1 — Center Origin

Keep the vanishing point in the middle of the parent.

CSS
<style>
  section {
    perspective: 500px;
    perspective-origin: center;
  }

  div {
    width: 120px;
    height: 80px;
    background: #1d4ed8;
    color: #fff;
    text-align: center;
    line-height: 80px;
    transform: rotateY(45deg);
  }
</style>

<section>
  <div>Card</div>
</section>
Try It Yourself

How It Works

  1. Set distance. perspective: 500px on section creates the 3D viewing context.
  2. Aim the point. perspective-origin: center places the vanishing point at 50% 50%.
  3. Turn the child. rotateY(45deg) foreshortens toward that center.
  4. Know the default. Leaving the origin line out looks the same, because center is the initial value.

Example 2 — Corner Keywords

Move the vanishing point to the bottom-right corner.

CSS
<style>
  section {
    perspective: 500px;
    perspective-origin: bottom right;
  }

  div {
    width: 120px;
    height: 80px;
    background: #1d4ed8;
    color: #fff;
    text-align: center;
    line-height: 80px;
    transform: rotateY(45deg);
  }
</style>

<section>
  <div>Card</div>
</section>
Try It Yourself

How It Works

  1. Keep the same distance. perspective: 500px matches Example 1 so only the origin changes.
  2. Use two keywords. bottom right means Y at 100% and X at 100%.
  3. Watch the lean. The rotated card foreshortens toward that corner instead of the center.
  4. Try other corners. top left, top, or left move the vanishing point the same way.

Example 3 — Percentage Position

Place the vanishing point with custom percentages.

CSS
<style>
  section {
    perspective: 500px;
    perspective-origin: 20% 80%;
  }

  div {
    width: 120px;
    height: 80px;
    background: #1d4ed8;
    color: #fff;
    text-align: center;
    line-height: 80px;
    transform: rotateY(45deg);
  }
</style>

<section>
  <div>Card</div>
</section>
Try It Yourself

How It Works

  1. First value is X. 20% is measured across the parent’s width.
  2. Second value is Y. 80% is measured down the parent’s height.
  3. Lengths work too. You can write 40px 120px, and negative values are allowed.
  4. Tune for the layout. Percentages are handy when the scene size is fluid and corners feel too extreme.

Edge Cases & Pitfalls

If the origin change seems invisible, one of these is usually why.

pair

Needs perspective on the same element

With perspective: none, changing the origin does nothing visible. Set a length first.

parent

Put it on the parent, not the child

Like perspective, the origin belongs on the scene container. The child’s pivot is transform-origin.

one-value

One value only sets X

perspective-origin: left means X is left and Y stays center. Use two values when you need a corner.

inherit

Not inherited by default

Children do not get the parent origin automatically. Use inherit only when a nested scene should copy it on purpose.

extreme

Values outside 0%–100% are valid

Negative percentages or values past 100% move the vanishing point outside the box. Useful for strong skew; easy to overdo.

Browser Support

perspective-origin is a browser CSS property for 3D transforms. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available since Sep 2015

perspective-origin

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 Chrome 36+ · 12+ with -webkit-
Full support
Mozilla Firefox 16+
Full support
Apple Safari 9+ · 4+ with -webkit-
Full support
Microsoft Edge 12+
Full support
Opera 23+
Full support
Samsung Internet 3+
Full support
Internet Explorer 10+
Full support
perspective-origin Widely supported

Bottom line: Safe for everyday use without prefixes in current browsers. Legacy WebKit needed -webkit-perspective-origin. Pair it with unprefixed perspective in modern code.

Key Takeaways

  • Role: aim the vanishing point on the parent that has perspective.
  • Common values: center, corner keywords, and percentages.
  • Initial value: 50% 50%. Not inherited.
  • Pairing: distance with perspective; pivot of the child with transform-origin.

One line: perspective-origin aims where the 3D scene converges; perspective sets how strong that depth feels.

Frequently Asked Questions

It sets the vanishing point for a 3D scene. The viewer appears to look from that point on the element that also has perspective.
Put it on the same parent that has perspective. That parent frames the scene for children with 3D transforms.
The initial value is 50% 50%, which is the same as center. The vanishing point sits in the middle of the element.
Yes. Without a perspective length on the same element, changing the origin has nothing visible to skew.
perspective-origin moves the vanishing point of the parent scene. transform-origin sets the pivot point of the element that is transformed.
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.

Next: place-content

Learn the shorthand that sets align-content and justify-content together.

place-content tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful