CSSpointer-events Property
Example
Set whether or not an element should react to pointer events:
.ex1 {
pointer-events: auto;
}
.ex2 {
cursor: not-allowed;
pointer-events: none;
}
Try it Yourself »pointer-events: auto;
}
.ex2 {
cursor: not-allowed;
pointer-events: none;
}
Definition and Usage
Thepointer-events property defines whether or not an element reacts to pointer events.
| Default value: | auto |
|---|---|
| Inherited: | yes |
| Animatable: | No.Read aboutanimatable |
| Version: | CSS3 |
| JavaScript syntax: | object.style.pointerEvents="none"Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | |||||
|---|---|---|---|---|---|
| pointer-events | 2.0 | 11.0 | 3.6 | 4.0 | 9.0 |
CSS Syntax
pointer-events: auto|none;
Property Values
| Property Value | Description |
|---|---|
| auto | The element reacts to pointer events, like :hover and click. This is default |
| none | The element does not react to pointer events |
| initial | Sets this property to its default value.Read aboutinitial |
| inherit | Inherits this property from its parent element.Read aboutinherit |

