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
Post a Comment