HTML Anchor, Disable Style

后端 未结 3 411
悲&欢浪女
悲&欢浪女 2021-02-06 21:48

I have some html anchor link code, and unlike the rest of document I want it to look like it is not a link.

Is there a simple way to disable the style change caused by w

3条回答
  •  再見小時候
    2021-02-06 22:47

    I achieved this by creating a class .reset-a and targeting all of its' pseudo classes.

    Targeting of all pseudo classes is important to make it flawless.

    outline: 0 property removes the dotted border that surrounds a link when it is focused or active.

    .reset-a, .reset-a:hover, .reset-a:visited, .reset-a:focus, .reset-a:active  {
      text-decoration: none;
      color: inherit;
      outline: 0;
      cursor: auto;
    }
    

提交回复
热议问题