Open In App
Related Articles

Tailwind CSS Transform

Improve Article
Improve
Save Article
Save
Like Article
Like

This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. This class is used to control the transform behavior of any element. In CSS, we can do that by using the CSS transform property.

Transform Classes:

  • transform: To perform any transformation you have to use this class.
  • transform-gpu: By using this class the transformation will be executed on GPU on CPU that will perform in a more soothing way.
  • transform-none: This class is used to deactivate the transformation effect.

Syntax:

<element class="transform-{trans-on}">...</element>

Example:

HTML




<!DOCTYPE html> 
<html
<head
    <link href
"https://unpkg.com/tailwindcss@^1.0/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 Transform Class</b
    <div class="bg-green-300 
                mx-16 
                space-y-4 
                p-2 
                justify-between 
                grid grid-rows-1 
                grid-flow-col"> 
      
    <div title="bg-left-top"
        class="bg-no-repeat
               w-16 h-16
               my-4 transform skew-y-12" 
        style= 
        "background-image:url( 
    </div
    <div title="bg-left"
        class="bg-no-repeat 
               w-16 h-16
               my-4 transform rotate-45" 
        style= 
        "background-image:url( 
    </div
    <div title="bg-left-bottom"
        class="bg-no-repeat 
               w-16 h-16 
               my-4 transform scale-50" 
        style="background-image:url( 
    </div
    <div title="bg-left-bottom"
        class="bg-no-repeat 
               w-16 h-16 
               my-4 transform translate-x-4 translate-y-4" 
        style="background-image:url( 
    </div>
    </div
</body
</html>


Output:

Tailwind CSS transform class


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 23 Mar, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials