KandZ – Tuts

We like to help…!

CSS 52 💻 transform translate and translate3d

a - transform translate
transform translate is used to move an element along the X and Y axes.
The transformation is defined by a two-dimensional vector
values(x,y): percentage and length values.
You can also mix the length and percentage values
transform: translate(150px); → moves the box 150px on X-axis
transform: translate(50px, 50px); → moves the box 50px on X and Y axes

b - transform translate3d, translateX | Y | Z
transform translate3d allows you to apply translations along X, Y and Z axis.
The transformation is defined by a three-dimensional vector
It is useful for creating 3D effects
values(x, y, z): percentage and length values.
translateX → moves an element along X axis
translateY → moves an element along Y axis
translateZ → moves an element along Z axis

Leave a Reply