Transform the element using x-axis with CSS3

CSSWeb DevelopmentFront End Technology

Use the translateX(x) method to transform the element using x-axis.

Let us see the syntax

translateX(x)

Here,

  • x: It is a length representing the abscissa of the translating vector.

Let us see an example

div {
   width: 40px;
   height: 40px;
   background-color: black;
}
.trans {
   transform: translateX(20px);
   background-color: orange;
}
raja
Published on 08-May-2018 07:29:51
Advertisements