css3 Series transform Detailed translate

translate

translate this parameter is transform the body, then what use is it?

In fact, his role is simply to translation, reference their location to pan

 

  translate()

  translateX()

  translateY()

  translateZ()

  translate3d()

 

translateX

Translation to the X axis, fill in positive right pan, fill in negative, the left translation

 

translateY

The Y-axis pan, fill the pan down a positive number, fill in negative, move it upward

 

translateZ

The Z-axis translation, this may be a bit difficult to understand, imagine a scenario where you are now and from the computer screen, which is the distance from the Z-axis, the closer your computer screen, the greater the () inside the value translateZ, away from the computer screen the more you away, translateZ () value smaller. So, Z increases, then the computer screen, the closer you are,

The following use to rotate, rotate, do not understand, please click → CSS3 Series transform Detailed rotate

First, the Z-axis towards us, so do not see results, however, we turn it around and let the Z-axis face right on it.

 

 

translate()  和   translate3d()

and simultaneously translate translateX translateY, disposed, so there can fill two parameters, a value of the second X Y

translate3d is also set translateX, translateY translateZ and so there can fill three parameters

Just a little bit different is that, translate if not fill the second argument, the default is 0, but translate3d, then people will not agree with you does not fill up, you three parameters, you must give me fill.

Guess you like

Origin www.cnblogs.com/yanggeng/p/11286250.html