property

Pointer events — CSS reference

Excludes the box from pointer hit testing, allowing an underlying target to receive input. Descendants can opt back in with auto. This is not a substitute for disabling a control or removing keyboard focus.

Formal Syntax & Structure

css syntaxcss
pointer-events: none;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>pointer-events</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}#a{pointer-events:none}</style><body><button id="b" style="position:absolute;left:10px;top:10px;width:100px;height:40px">Open</button><div id="a" style="position:absolute;left:10px;top:10px;width:100px;height:40px">Overlay</div></body></html>
CSS Reference