CSS pointer-events property

Definition and usage

The pointer-events property defines whether the element responds to pointer events.

Example

Set whether the element responds to pointer events:

div.ex1 {
  pointer-events: none;
}
div.ex2 {
  pointer-events: auto;
}

Try it yourself

CSS Syntax

pointer-events: auto|none;

Property value

Value Description
auto Default value. The element responds to pointer events, such as :hover and click.
none The element does not respond to pointer events.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical details

Default value: auto
Inheritance: Yes
Animation creation: Not supported. See:Animation-related properties.
Version: CSS3
JavaScript Syntax: object.style.pointerEvents="none"

Browser support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome IE / Edge Firefox Safari Opera
2.0 11.0 3.6 4.0 9.0