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.
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.

![Unboxing Vivo Y11 - Rs.9,490/- only
As of 17th November 2020, the price of Vivo Y11 (2019) price at Bhutan Telecom Counter is Rs. 9,490/- (Same as India).
Vivo Y11 (2019) smartphone (Quick review):
* 3GB RAM / 32GB ROM
* Dual rear camera setup [13mp (with autofocus) +2MP (8MP for selfies)]
* Video Qualities: 480p, 720p & 1080p.
* 5000 mAh Battery (Non-removable).
* Sim: Dual-SIM (GSM and GSM).
* Weight: 190.50 grams.
* Launched on 18th October 2019.
* Touchscreen display: 6.35-inches
* Resolution: 720x1544 pixels.
* Powered by an octa-core Qualcomm Snapdragon 439 processor. It runs on Android 9 Pie.
* Sensors: compass, accelerometer, ambient light sensor, proximity sensor, fingerprint sensor, face unlock.
⟱ Other videos you might be interested⥥ :
➠ Stop the pop-up notification-Ultra data saving mode turned off: https://www.youtube.com/watch?v=x46MZ_uBJWE
➠ Good Or Bad Day Calculator: https://www.youtube.com/watch?v=kjZnTIz8xos
➠ Turn On/Off Bixby In Samsung Cell Phone: https://www.youtube.com/watch?v=xGskZbgYf1Q
▶Subscribe my YouTube channel at http://bit.ly/sub815
▶Visit my blog at http://v815.blogspot.com
▶Like my Facebook Page at https://facebook.com/sirchogyal
Follow me on:
❀Twitter: https://twitter.com/sirchogyal
❆Instagram: https://www.instagram.com/sirchogyal Unboxing Vivo Y11 - Rs.9,490/- only](https://i.ytimg.com/vi/mFhxE2pzXPA/mqdefault.jpg)








