Open In App
Related Articles

CSS perspective-origin Property

Improve Article
Save Article
Like Article

The perspective-origin property in CSS is used to define the position at which the user is looking 3D object i.e. the vanishing point of the 3D object. 


perspective-origin: x-axis y-axis|initial|inherit;

Property Values:

  • x-axis: It represents the horizontal position of the perspective origin. The possible value of x-axis are listed below:
    • percentage (%): It set the x-axis in terms of percentage.
    • length: It defines the length of x-axis.
    • left: It sets the position left in x-axis.
    • center: It sets position center in x-axis.
    • right: I sets the position right in terms of x-axis.
  • y-axis: It represents the vertical position of the perspective origin. The possible value of y-axis are listed below:
    • percentage (%): It set the position of y-axis in terms of percentage.
    • length: It sets the position in terms of length.
    • top: It sets the top position in y-axis.
    • center: It sets the center position in y-axis.
    • bottom: It sets the bottom position in y-axis.
  • initial: It sets the perspective-origin property to its default value.
  • inherit: The perspective-origin property is inherited from its parent.



<!DOCTYPE html>
        CSS perspective-origin Property
        .container1 {
            padding: 20px;
            perspective: 100px;
            perspective-origin: 75%;
            /* For Safari Browsers */
            -webkit-perspective: 100px;
            -webkit-perspective-origin: 75%;
        .container2 {
            padding: 20px;
            perspective: 100px;
            perspective-origin: bottom right;
            /* For Safari Browsers */
            -webkit-perspective: 100px;
            -webkit-perspective-origin: bottom right;
        .container3 {
            padding: 20px;
            perspective: 100px;
            perspective-origin: center;
            /* For Safari Browsers */
            -webkit-perspective: 100px;
            -webkit-perspective-origin: center;
        .rotate {
            width: 100px;
            padding: 50px;
            text-align: center;
            background: green;
            transform: rotateX(10deg);
    <div class = "container1">
        <p>perspective-origin: 75%;</p>
        <div class = "rotate">image</div>
    <div class = "container2">
        <p>perspective-origin: bottom right;</p>
        <div class = "rotate">image</div>
    <div class = "container3">
        <p>perspective-origin: center;</p>
        <div class = "rotate">image</div>



Supported Browsers: The browser supported by perspective-origin property are listed below:

  • Google Chrome 36.0
  • Edge 12.0
  • Apple Safari 9.0
  • Mozilla Firefox 16.0
  • Opera 23.0
  • Internet Explorer 10.0

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 28 Feb, 2023
Like Article
Save Article
Similar Reads
Related Tutorials