Open In App

Tailwind CSS Scale

Last Updated : 23 Jul, 2025
Suggest changes
Share
2 Likes
Like
Report

This class accepts lots of value in tailwind CSS in which all the functional properties are covered in class form. This class is used to resize the element in the 2D plane. It scales the elements in horizontal and vertical directions. In CSS, we can do that by using the CSS scale() function.

Scale classes:

  • scale-0|50|75|90|95|100|105|110|125|150: This class is used to scale on both axis percentage-wise.
  • scale-x-0|50|75|90|95|100|105|110|125|150: This class is used to scale on x-axis percentage-wise.
  • scale-y-0|50|75|90|95|100|105|110|125|150: This class is used to scale on y-axis percentage-wise.

Syntax:

<element class="scale-{axis-percentage}">...</element>

Example:

HTML
<!DOCTYPE html> <html> <head> <link href= "https://unpkg.com/tailwindcss@1.9.6/dist/tailwind.min.css" rel="stylesheet"> </head> <body class="text-center"> <h1 class="text-green-600 text-5xl font-bold"> GeeksforGeeks </h1> <b>Tailwind CSS Scale Class</b> <div class="bg-green-300   mx-16  p-4  justify-between   grid grid-flow-col"> <div class="bg-no-repeat  w-16 h-16 transform scale-50" style= "background-image:url(  https://media.geeksforgeeks.org/wp-content/uploads/20210222211217/Screenshot20210222211207.png)"> </div> <div class="bg-no-repeat   w-16 h-16 transform scale-75" style= "background-image:url(  https://media.geeksforgeeks.org/wp-content/uploads/20210222211217/Screenshot20210222211207.png)"> </div> <div class="bg-no-repeat   w-16 h-16 transform scale-100" style="background-image:url(  https://media.geeksforgeeks.org/wp-content/uploads/20210222211217/Screenshot20210222211207.png)"> </div> <div class="bg-no-repeat   w-16 h-16 transform scale-125" style="background-image:url(  https://media.geeksforgeeks.org/wp-content/uploads/20210222211217/Screenshot20210222211207.png)"> </div> </div> </body> </html> 

Output:

CSS Scale Class

Explore