What does the scaleZ() CSS transform function do?

后端 未结 4 977
难免孤独
难免孤独 2021-02-01 07:07

I’m trying to wrap my tiny brain around 3D CSS transforms, and I‘m having trouble understanding what the scaleZ() function is for.

scale(),

4条回答
  •  野性不改
    2021-02-01 07:43

    there are three views in over webpage X, Y & Z like for example z-index as it's same thing the scaleZ().

    Check what w3c say

    scale([, ])
    specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first.
    scale3d(, , )
    specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters.
    scaleX()
    specifies a scale operation using the [sx,1,1] scaling vector, where sx is given as the parameter.
    scaleY()
    specifies a scale operation using the [1,sy,1] scaling vector, where sy is given as the parameter.
    scaleZ()
    specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter. 
    

    check your link animation http://www.webkit.org/blog-files/3d-transforms/morphing-cubes.html

    EDIT:

    your fiddle still not explain what is scaleZ() because we can get that effect from scaleY() also.

    Check this fiddle http://jsfiddle.net/sandeep/dppNn/

    Now in my fiddle example you can the 3rd digit box look like 3D means with scaleX(),scaleY() & scaleZ() & 2nd digit box look like 2D because they scale only scaleX() & scaleY().

提交回复
热议问题