CSS3 perspective-origin property
Examples
Setting a 3D element base location:
{
perspective: 150;
perspective-origin: 10% 10%;
-webkit-perspective: 150; / * Safari and Chrome * /
-webkit-perspective-origin: 10% 10%; / * Safari and Chrome * /
}
try it"
Browser Support
Figures in the table represent the first browser to support the version number of the property.
Immediately following the digital -webkit-, -ms- or -moz- ago in support of the prefix attribute first browser version number.
属性 | |||||
---|---|---|---|---|---|
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- |
Attribute definitions and instructions
X-axis and Y-axis perspective-origin property definition 3D element is based. This property allows you to change the position of the bottom of the 3D elements.
perspective -Origin attribute definition, which is a child of an element, perspective, and not the element itself.
Note: For Chrome and Safari users: In order to better understand the perspective attribute!
For Chrome and Safari users: In order tobetter understand the perspective-Origin attribute, see the view instance .
Defaults: | 50% 50% |
---|---|
inherit: | no |
version: | CSS3 |
JavaScript syntax: | object .style.perspectiveOrigin = "10% 10%" |
grammar
value | description |
---|---|
x-axis | The view is defined in the x-axis position. Default: 50%. Possible values:
|
y-axis | The definition of the view position in the y-axis. Default: 50%. Possible values:
|