pointer-events: none;
prevents any pointer (pointer ) action on the specified element (such as click, drag, hover, etc.). The natural value of pointer-events
is auto
.
Value inherit
: its use is not very justified. When you specify pointer-events: none;
(or auto
) to an element, all child elements already inherit this value.
Example:
<div style="pointer-events: none;">
<!-- não fez sentido usar inherit no elemento abaixo,
já que ele herda automaticamente o none da div-pai -->
<a href="" style="pointer-events: inherit;">Link</a>
<br />
<p>Texto</p>
</div>
There are other values for pointer-events
, but only apply to SVG ( scalable vector graphics ):
-
visiblePainted
-
visibleFill
-
visibleStroke
-
visible
-
painted
-
fill
-
stroke
-
all
For details of these specifications, you can consult documentation at MDN .