Is it possible to make an HTML anchor tag not clickable/linkable using CSS?

前端 未结 9 2171
故里飘歌
故里飘歌 2020-12-12 11:33

For example if I have this:

page link

Is there anything I can use for the style attribute that

9条回答
  •  天涯浪人
    2020-12-12 11:55

    You can use this css:

    .inactiveLink {
       pointer-events: none;
       cursor: default;
    }
    

    And then assign the class to your html code:

    page link
    

    It makes the link not clickeable and the cursor style an arrow, not a hand as the links have.

    or use this style in the html:

    page link
    

    but I suggest the first approach.

提交回复
热议问题