Transform the element along with y-axis using CSS



Used to translateY(n) method to transform the element along with y-axis.

Let us see the syntax:

translateY(n)

Here, n is a length representing the abscissa of the translating vector.

Example

Let us see an example −

div {    width: 50px;    height: 50px;    background-color: black; } .trans {    transform: translateY(20px);    background-color: orange; }
Updated on: 2020-06-29T11:11:45+05:30

318 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements