html - How to disable a link using only CSS? -


is there way disable link using css?

i have class called current-page , want links class disabled no action occurs when clicked.

the answer in comments of question. more visibility, copying this solution here:

<a href="link.html" class="not-active">link</a>  .not-active {    pointer-events: none;    cursor: default; } 

example: http://jsfiddle.net/7eqjp

for browser support, please see: http://caniuse.com/#search=pointer-events*, if need support ie there workaround, see this answer.

warning: use of pointer-events in css non-svg elements experimental. feature used part of css3 ui draft specification but, due many open issues, has been postponed css4.*


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -