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

前端 未结 9 2175
故里飘歌
故里飘歌 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:41

    It can be done in css and it is very simple. change the "a" to a "p". Your "page link" does not lead to somewhere anyway if you want to make it unclickable.

    When you tell your css to do a hover action on this specific "p" tell it this:

    (for this example I have given the "p" the "example" ID)

    #example
    {
      cursor:default;
    }
    

    Now your cursor will stay the same as it does all over the page.

提交回复
热议问题