Transform the element using y-axis with CSS3

CSSWeb DevelopmentFront End Technology

Use the translateY(y) method to transform the element using y-axis.

Let us see the syntax −

translateY(y)

Here,

  • y: It is a length representing the ordinate of the translating vector.

Let us see an example:

div {
   width: 40px;
   height: 40px;
   background-color: black;
}
.trans {
   transform: translateY(20px);
   background-color: orange;
}
raja
Published on 08-May-2018 08:30:54
Advertisements