3D变换和景深

144 阅读1分钟

旋转:

rotateX( )
rotateY( )
rotateZ( ) 
rotate3D(x,y,z,deg)
x,Y,Z 取值0为否
      取值1为是
      
deg旋转的角度

缩放:

scaleZ( )
scale3D(x,y,z)

[注]单独使用效果不明显,需要配合其他功能函数一块使用

景深

景深:近大远小的效果
    perspective:;给父元素添加,作用到子元素身上
        900p- 1200px
        
    3D环境: transform- style: ;给父元素添加,给子元素提供3d环境
        falt 默认值, 2D环境
        preserve -3d 3D环境
        
    3D功能函数:
        位移:
            translateZ()
            trans late3D(x,y,z)