HTML DOM Style perspectiveOrigin property
Examples
3D elements set point position:
try it"
Definition and Usage
perspectiveOrigin attribute definition 3D elements based on the X-axis and Y-axis. This property allows you to change the position of the bottom of the 3D elements.
When an element is defined perspectiveOrigin attributes, child elements get their perspective effect, rather than the element itself.
Note: Please This property perspective attribute, but only affects the 3D conversion element!
Browser Support
IE10 + and Firefox support perspectiveOrigin property.
Chrome, Safari and Opera support another alternative of the property attribute that WebkitPerspecitveOrigin property.
grammar
Back perspectiveOrigin properties:
Setting perspectiveOrigin properties:
Property Value
值 | 描述 |
---|---|
x-axis | 定义该视图在 x 轴上的位置。 可能的值:
默认值:50% |
y-axis | 定义该视图在 y 轴上的位置。 可能的值:
默认值:50% |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | 50% 50% |
---|---|
return value: | String representing perspective-origin property element. |
CSS version | CSS3 |
related articles
JavaScript Style Object: Perspective Properties
CSS Reference: Perspective-Origin attribute