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; }
and
a {outline : none;}
But nothing seems to get rid of it. Is there a way to remove it?
Nuno Bentes
You can just use this:
a:active, a:focus {
outline: 0;
border: none;
-moz-outline-style: none;
}
Simply add outline:none; text-decoration:none;
Just add a:visited { outline: none; }
in your style file.
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.
来源:https://stackoverflow.com/questions/34635588/how-do-i-remove-outline-on-link-click