TranslateX(), translateY(), translate(x, y) & translate3d() CSS functions of the transform property @SirChogyal
TranslateX(), translateY(), translate(x, y) & translate3d() CSS functions of the transform property  @SirChogyal
Uploaded August 2022 | Updated September 2026, 1 week ago
The translate() CSS function is used to reposition an element to the top, bottom, right, left, front and back directions. The value can be in px, in, cm, em, %, etc., okay. However, the translateZ() doesn't support the value in percentage (%).

The translateX() CSS function moves an element horizontally to the left or right direction. The negative value will shift the element toward the left direction and the positive value will shift the element toward the right direction.
TranslateX() examples which are all same: translateX(30px) = translate(30px) = translate(30px, 0) = translate3d(30px, 0, 0)

TranslateY(): The translateY() CSS function moves an element vertically to the bottom or top direction. The negative value will shift the element toward the top direction and the positive value will shift the element toward the bottom direction.
TranslateY() examples which are all same: translateY(80px) = translate(0, 80px) = translate3d(0, 80px, 0)

Translate(x, y): We can write the translate X & Y at a time.
Translate(x, y) examples which are all same: translate(1cm, -80%) = translateX(1cm) translateY(-80%) = translate(1cm) translateY(-80%) = translate3d(1cm, -80%, 0)

TranslateZ(): The translateZ() CSS function moves an element to the front or back direction in a 3D view. The negative value will shift the element toward the back direction and the positive value will shift the element toward the front direction.
TranslateZ() examples which are all same: translateZ(1.2in) = translate3d(0, 0, 1.2in)

Translate3d(x, y, z):
The translate3d() CSS function moves an element along the X, Y & Z axes in a 3D space. It is just like a shorthand method of writing all the translate X, Y & Z together. To make the object move closer or further, we can link the perspective() function with the translate Z. Make sure the perspective() function is written before the translate() function. The negative Z value will push the object further. The positive Z value will make the object come closer. As we learned at the beginning, the x value will move the element to the right or left direction and the y value will move the element to the bottom or top direction.
Translate3d(x, y, z) examples which are all same: translate3d(50px, -5ch, 50em) = translateX(50px) translateY(-5ch) translateZ(50em) = translate(50px) translateY(-5ch) translateZ(50em) = translate(50px, -5ch) translateZ(50em)

Join this channel to get access to perks:
youtube.com/channel/UCMlolkzOaMlIcf_CdljmIOg/join

❀ Join me on Telegram: https://telegram.im/@code8home

❀ Merch: my-store-6057984.creator-spring.com

❀ Visit my blog at c815.blogspot.com

▶️ Subscribe to this channel for more videos.
TranslateX(), translateY(), translate(x, y) & translate3d() CSS functions of the transform propertySharing Internet From Computer To Phone & Other DevicesUnboxing Vivo Y11 - Rs.9,490/- onlyHow To Hide an image URL from InspectingCode Tag in HTMLHow To Fix  Bitmap Image Missing From The Right Click Context MenuHow I Fixed The number of ads you can show has been limited  For details go to the Policy centerHow To Create A Standard Login Form - Part 2/6A simple Tool to Write or Learn other Languages that you dont knowScrollbar CSS with Links For Your WebsiteHow to disable or enable News Feed on Microsoft Edge in windows 10How To use strong tag & em tag in HTML
Sir Chogyal |

TranslateX(), translateY(), translate(x, y) & translate3d() CSS functions of the transform property

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER