CSS3 perspective-origin Property
Example
Set the base position of a 3D element:
Try it Yourself »
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -webkit-, -ms-, or -moz- specify the first browser version that supported the prefixed property.
| Property | |||||
|---|---|---|---|---|---|
| perspective-origin | 36.0 12.0 -webkit- |
10.0 | 16.0 10.0 -moz- |
9.0 4.0.3 -webkit- |
23.0 15.0 -webkit- |
Property definition and usage instructions
The perspective-origin property defines the X-axis and Y-axis on which the 3D element is based. This property allows you to change the bottom position of the 3D element.
When defined, the perspective-origin property applies to an element's child elements, providing the perspective view, rather than to the element itself.
Note:For Chrome and Safari users: For a better understandingperspectiveproperty!
For Chrome and Safari users:For a better understanding of the perspective-origin property, seeView examples.
| Default value: | 50% 50% |
|---|---|
| Inherited: | no |
| version: | CSS3 |
| JavaScript Syntax: | object.style.perspectiveOrigin="10% 10%" |
Syntax
| Value | Description |
|---|---|
| x-axis |
Defines the position of the view on the x-axis. Default value: 50%. Possible values:
|
| y-axis |
Defines the position of the view on the y-axis. Default value: 50%. Possible values:
|