19
4

7 回答 7

10

不幸的是,我认为这hideFocus是你最好的答案,因为模糊并不总是合适的:

<a href="..." hidefocus="hidefocus">...</a>

http://msdn.microsoft.com/en-us/library/ms533783(VS.85).aspx

于 2009-09-03T05:28:01.863 回答
3

听起来您正在谈论通过链接进行选项卡时出现的虚线边框。您有 Firefox 的正确解决方案(大纲:CSS 中没有)。我用于 IE 的最佳解决方案是添加一个取消焦点的 onfocus 侦听器:

<a href="" onfocus="this.hideFocus=true;">link</a>

看看这个网站,看看你如何在全球范围内做到这一点:http: //codylindley.com/Javascript/223/hiding-the-browsers-focus-borders-should-i-shouldnt-i

于 2009-09-03T05:19:08.077 回答
2

除非我错过了正在讨论的虚线边框,否则 outline:none 在 Internet Explorer 8 中有效(至少对我而言)。而是突然之间,一些超链接以虚线边框呈现(我记得唯一更改的属性是 display:inline 在包含链接的 h2 元素上,然后出现虚线边框)。所以我扔了一个{大纲:无;在我的全局样式表和 poof 中,IE8 中不再有边框!

于 2009-09-18T17:57:34.013 回答
1

对于 IE,您可以像这样使用 Javascript:

<a href="..." onfocus="this.blur();">Click Here</a>

阅读更多: http ://www.htmlgoodies.com/beyond/javascript/article.php/3471171

对于 Firefox 和 Safari,outline:none 有效。

阅读更多: http ://css-tricks.com/removing-the-dotted-outline/

于 2009-09-03T05:27:39.977 回答
0

a {outline:noneIE 8}css 似乎在 Firefox、Chrome 和 IE 8 上运行良好。

于 2011-12-13T15:59:23.287 回答
0

这不起作用吗?

a
{
   border: 0;
}
于 2009-09-03T05:14:08.927 回答
0
a {
  outline: 0 none !important;
  border: none;
}
于 2013-09-10T07:15:32.793 回答