📅  最后修改于: 2020-11-05 09:04:09             🧑  作者: Mango
CSS 3D变换使您可以将元素移动到X轴,Y轴和Z轴。以下是3D变换方法的列表:
Function | Description |
---|---|
matrix3D(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n) | It specifies a 3D transformation, using a 4×4 matrix of 16 values. |
translate3D(x,y,z) | It specifies a 3D translation. |
translateX(x) | It specifies 3D translation, using only the value for the X-axis. |
translateY(y) | It specifies 3D translation, using only the value for the Y-axis. |
translateZ(z) | It specifies 3D translation, using only the value for the Z-axis. |
scale3D(x,y,z) | It specifies 3D scale transformation |
scaleX(x) | It specifies 3D scale transformation by giving a value for the X-axis. |
scaley(y) | It specifies 3D scale transformation by giving a value for the Y-axis. |
scaleZ(z) | It specifies 3D scale transformation by giving a value for the Z-axis. |
rotate3D(X,Y,Z,angle) | It specifies 3D rotation along with X-axis, Y-axis and Z-axis. |
rotateX(angle) | It specifies 3D rotation along with X-axis. |
rotateY(angle) | It specifies 3D rotation along with Y-axis. |
rotateZ(angle) | It specifies 3D rotation along with Z-axis. |
perspective(n) | It specifies a perspective view for a 3D transformed element. |
Property | Chrome | IE | Firefox | Opera | Safari |
---|---|---|---|---|---|
transform |
36.012.0 -webkit-
|
10.0 |
16.0 10.0 -moz-
|
23.015.0 -webkit-
|
9.04.0 -webkit-
|
transform-origin (three-value syntax)
|
36.012.0 -webkit-
|
10.0 |
16.010.0 -moz-
|
23.015.0 -webkit-
|
9.04.0 -webkit-
|
transform-style |
36.012.0 -webkit-
|
11.0 |
16.010.0 -moz-
|
23.015.0 -webkit-
|
9.04.0 -webkit-
|
perspective |
36.012.0 -webkit-
|
10.0 |
16.010.0 -moz-
|
23.015.0 -webkit-
|
9.04.0 -webkit-
|
perspective-origin |
36.012.0 -webkit-
|
10.0 |
16.010.0 -moz-
|
23.015.0 -webkit-
|
9.04.0 -webkit-
|
backface-visibility |
36.0 12.0 -webkit-
|
10.0 |
16.010.0 -moz-
|
23.015.0 -webkit-
|
9.04.0 -webkit-
|
CSS 3D rotationX()方法用于根据给定的度数围绕元素的X轴旋转元素。
请参阅以下示例:
This is JavaTpoint!
This is JavaTpoint!
Note: Internet Explorer 9 (and earlier versions) does not support the rotateX() method.
CSS 3D rotationY()方法用于根据给定的度数围绕元素的Y轴旋转元素。
请参阅以下示例:
Welcome to JavaTpoint!.
Welcome to JavaTpoint!.
Note: Internet Explorer 9 (and earlier versions) does not support the rotateY() method.
CSS 3D rotationZ()方法用于根据给定的度数围绕元素的Z轴旋转元素。
看这个例子:
Welcome to JavaTpoint!
Welcome to JavaTpoint!
Note: Internet Explorer 9 (and earlier versions) does not support the rotateZ() method.