A scale transform the element by using y-axis with CSS3


The scaleY(y) method is used to scale transform the element using y-axis.

Let us see the syntax −

scaleY(y)

Here, y is a number representing the scaling factor to apply on the ordinate of each point of the element.

Let us see an example −

div {
   width: 60px;
   height: 60px;
   background-color: yellow;
}
.scaled {
   transform: scaleY(0.5);
   background-color: black;
}

Updated on: 20-Jun-2020

221 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements