Transform the element using z-axis with CSS3

CSSWeb DevelopmentFront End Technology

Use the translateZ(z) method to transform the element using z-axis.

Let us see the syntax

translateZ(z)

Here,

z: It is a length representing the z-component of the translating vector.

Let us see an example

div {
   width: 40px;
   height: 40px;
   background-color: black;
}
.trans {
   transform: perspective(400px) translateZ(100px);
   background-color: orange;
}
raja
Published on 02-May-2018 16:35:49
Advertisements