Transform the element along with x-axis using CSS

CSSWeb DevelopmentFront End Technology

Use the translateX(n) method to transform the element along with x-axis.

Let us see the syntax

translateX(n)

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

Let us see an example

div {
   width: 50px;
   height: 50px;
   background-color: black;
}
.trans {
   transform: translateX(20px);
   background-color: orange;
}
raja
Published on 02-May-2018 12:24:41
Advertisements