To disable HTML links with CSS, we set the pointer-events
property.
For instance, we write
<a class="disabled" href="#">...</a>
to add a link.
Then we write
a.disabled {
pointer-events: none;
}
to disable the link with class disabled
by setting the pointer-events
property to none
.
pointer-events: none;
disables all mouse events.