用于控制元素是否响应指向事件的功能类。
使用 pointer-events-auto 来恢复浏览器对指向事件(如 :hover 和 click )的默认行为。
使用 pointer-events-none 使元素忽略指向事件。指向事件仍然会在子元素上触发,并传递到目标元素的下方。
Try clicking the caret icon to open the dropdown
pointer-events-auto (event captured)
pointer-events-none (event passes through)
<div class="relative">
  <select class="...">
    <option>Indiana</option>
    <option>Michigan</option>
    <option>Ohio</option>
  </select>
  <div class="pointer-events-auto ...">
    <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"></path></svg>
  </div>
</div>
<div class="relative">
  <select class="...">
    <option>Indiana</option>
    <option>Michigan</option>
    <option>Ohio</option>
  </select>
  <div class="pointer-events-none ...">
    <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"></path></svg>
  </div>
</div>默认情况下, 针对 pointer event 功能类,只生成 responsive 变体。
您可以通过修改您的 tailwind.config.js 文件中的 variants 部分中的 pointerEvents 属性来控制为 pointer event 功能生成哪些变体。
例如,这个配置也将生成 hover and focus 变体:
  // tailwind.config.js
  module.exports = {
    variants: {
      extend: {
        // ...
+       pointerEvents: ['hover', 'focus'],
      }
    }
  }如果您不打算在您的项目中使用 pointer event 功能,您可以通过在配置文件的 corePlugins 部分将 pointerEvents property to false in the corePlugins section of your config file:
  // tailwind.config.js
  module.exports = {
    corePlugins: {
      // ...
+     pointerEvents: false,
    }
  }