开发者

Is there any way to prevent the trailing ants border effect on links?

开发者 https://www.devze.com 2023-02-25 00:39 出处:网络
This is what I\'m talking about: It\'s a javascript void link: <a href=\"javascript:void(0)\">Contact</a>开发者_JAVA百科

This is what I'm talking about:

Is there any way to prevent the trailing ants border effect on links?

It's a javascript void link:

<a href="javascript:void(0)">Contact</a>

开发者_JAVA百科

so it doesn't take the user anywhere. When clicked it shows off that traling ants border. Is there any way to prevent this using either css or javascript?


The simple CSS answer is:

a{
    outline: 0;
}

Addition:

You should probably be using a CSS reset but the web development world is pretty split on that. I like using Eric Meyer's ResetCSS.


This will remove them from everywhere:

*:focus { outline: none; }
*::-moz-focus-inner { border: none; }
0

精彩评论

暂无评论...
验证码 换一张
取 消