Horje
Tailwind CSS Pointer Events

This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. This class is used to specify whether elements show to pointer events or not show on the pointer. In CSS, we do that by using the CSS pointer-events property

Pointer Events Classes:

  • pointer-events-none: This class is used to specify that an element does not react to pointer-events.
  • pointer-events-auto: This class is used to specify that an element must react to pointer events.

Syntax:

<element class="pointer-events-{behaviour}">...</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 Pointer Events Class</b
    <div id="main" class="p-2 justify-around ml-32 h-26 w-2/3 flex 
                          items-stretch 
                          bg-green-200 border-solid border-4 
                          border-green-900 gap-4"> 
        <div class="pointer-events-auto bg-blue-600 
                    w-full h-8 rounded-lg">
            pointer-events-auto
  
        </div
        <div class="pointer-events-none bg-green-600 
                    w-full h-8 rounded-lg">
            pointer-events-none
  
        </div
    </div
</body
  
</html>

Output:




Reffered: https://www.geeksforgeeks.org


CSS

Related
Tailwind CSS Transition Timing Function Tailwind CSS Transition Timing Function
How to create Hover animations on Button ? How to create Hover animations on Button ?
Sidebar Menu Using HTML and CSS Sidebar Menu Using HTML and CSS
Tailwind CSS Table Layout Tailwind CSS Table Layout
Tailwind CSS Transition Delay Tailwind CSS Transition Delay

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
17