translateY() CSS Function


The translateY() CSS function shifts the element relative to its original location by the specified vertical value.


transform: translate(ty);


  • tyVertical shift. A positive value moves up, a negative value down.
Any length units accepted in CSS are accepted as values ​​- for example, pixels (px), inches (in), points (pt), etc. A positive value shifts down, a negative one up. A value of 0 does not change the position of the element.


<img class="translate" src="images/nature.jpg" alt="Nature Image">
.translate {
transform: translateY(-50px);

Browser Support

Explorer Edge Chrome Firefox Opera Safari
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung

Last updated by CSSPortal on: 1st December 2019