How do I remove outline on link click?

后端 未结 6 722
青春惊慌失措
青春惊慌失措 2021-02-06 20:47

When I click a link on my website it is creating an outline around the link like so

I\'ve tried adding:

a.image-link:focus { outline: 0; }


        
相关标签:
6条回答
  • 2021-02-06 21:14

    Worked for me

    I battled this for a while and this worked for me on WordPress 5.5.3 with StoreFront theme:

    a:hover,
    a:active {
        outline: none;
        box-shadow: none !important;
    }
    
    0 讨论(0)
  • 2021-02-06 21:22

    Simply add outline:none; text-decoration:none;

    0 讨论(0)
  • 2021-02-06 21:24

    You can just use this:

    a:active, a:focus {
      outline: 0;
      border: none;
      -moz-outline-style: none;
    }
    
    0 讨论(0)
  • 2021-02-06 21:28

    Fixed:

    Found out in my CSS that there was code already being generated to create an outline on a:active. This was overriding my code and removing it fixed the problem.

    0 讨论(0)
  • 2021-02-06 21:34

    Just add a:visited { outline: none; } in your style file.

    0 讨论(0)
  • 2021-02-06 21:36

    If at-least one of the solutions above doesn't work for anyone. Give this a try as well

    a:active, a:focus {
     box-shadow: none;
    }
    
    0 讨论(0)
提交回复
热议问题