3d functions

We’ve seen how transform functions operate on a plane, along the x and y axis.

For example:

translate() with up to 2 parameters:

translate(x)

translate(x,y)

translateX() as x only

translateY() as y only

But all these functions also have a 3d version.

For example, translate() has a translate3d() version that performs transformation along 3 dimensions, which means it includes the z axis as well (and as such, a standalone translateZ() function exists as well).

The z parameter basically make the element move closer and further, whether we increase or decrease its value. It’s like zooming in and out.