CSS pointer-events Property

The pointer-events property specifies if the element should do some action or not when the pointer event is triggered upon it. Pointer events can be triggered by mouse click, touch, stylus, etc.

Following is the code showing pointer-events property in CSS −


 Live Demo

<!DOCTYPE html>
body {
   font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
.pointer1 {
   font-size: 20px;
   padding: 10px;
   pointer-events: none;
.pointer2 {
   font-size: 20px;
   padding: 10px;
   pointer-events: auto;
<h1>Pointer-events property example</h1>
<div class="pointer1">
Go to <a href="https://www.wikipedia.org">wikipedia.org</a>
<div class="pointer2">
Go to <a href="https://www.google.com/">google.com</a>
<h2>Hover over the above links to see pointer events</h2>


The above code will produce the following output −

On hovering over the second link, you can see the mouse pointer since we have set pointerevents property..