How to disable a link using only CSS?

前端 未结 22 2930
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 02:58

Is there any way to disable a link using CSS?

I have a class called current-page and want links with this class to be disabled so that no action occurs

22条回答
  •  后悔当初
    2020-11-22 03:43

    If you want to stick to just HTML/CSS on a form, another option is to use a button. Style it and set the disabled attribute.

    E.g. http://jsfiddle.net/cFTxH/1/

提交回复
热议问题