Set a 3D element's base placement:
The perspectiveOrigin property defines where a 3D element is based in the x- and the y-axis. This property allows you to change the bottom position of 3D elements.
When defining the perspectiveOrigin property for an element, it is the CHILD elements that are positioned, NOT the element itself.
Note: This property must be used together with the perspective property, and only affects 3D transformed elements!
The perspectiveOrigin property is supported in IE10+ and Firefox.
Chrome, Safari, and Opera support an alternative, the WebkitPerspecitveOrigin property.
Return the perspectiveOrigin property:
Set the perspectiveOrigin property:
Value | Description |
---|---|
x-axis | Defining where the view is placed at the x-axis Possible values:
Default value: 50% |
y-axis | Defining where the view is placed at the y-axis Possible values:
Default value: 50% |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | 50% 50% |
---|---|
Return Value: | A String, representing the perspective-origin property of an element |
CSS Version | CSS3 |
JavaScript Style Object: perspective property
CSS reference: perspective-origin property