How to make an anchor link non-clickable or disabled with CSS?

Spread the love

To make an anchor link non-clickable or disabled with CSS, we set the pointer-events property.

For instance, we write

.disableClick {
  pointer-events: none;
}

to set pointer-events to none for the elements with class disableClick to disable mouse events on the elements with the class.

Leave a Reply

Your email address will not be published. Required fields are marked *