Open In App

What is the use of the CSS pointer-events Property?

Last Updated : 01 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The Pointer-events property in CSS is used to control how an element responds to pointer events, such as mouse clicks and hover interactions. It provides a way to determine whether an element should be a target for user input.

The pointer-events property can take various values, including auto, none, and others also.

Syntax:

/* Making an element unresponsive to pointer events */

.non-interactive {
pointer-events: none;
}

Features:

The pointer-events property also:

  • Determines how an element reacts to pointer events.
  • Values include auto (default), none, visible, visiblePainted, etc.
  • Useful for making an element non-interactive or allowing it to be a target for pointer events.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads