IE7大纲:0无效

时间:2012-07-06 11:03:12

标签: jquery html css internet-explorer internet-explorer-7

我理解大纲用于辅助功能,但另一种方式是:

a {
   outline: 0;
}

在IE7中有效的东西

或许使用Jquery?

4 个答案:

答案 0 :(得分:2)

对于jquery,你可以试试这样的东西

$('a').focus(function() {
  $(this).blur();
});

它与IE 7唯一的解决方案基本相同,它说当锚点聚焦时,模糊它。我在Mac VM IE 7上试过这个并且它可以正常工作

http://jsfiddle.net/QnMLR/2/

顶部有一个轮廓,底部没有

答案 1 :(得分:1)

现在习惯focus

a:hover, a:active, a:focus{
outline:0;
}

更多信息http://css-tricks.com/removing-the-dotted-outline/


更新即解决方案

a:focus, *:focus {
    noFocusLine: expression(this.onFocus=this.blur());
}

更多信息http://www.cssjunction.com/css/remove-dotted-border-in-ie7/

答案 2 :(得分:1)

这也可以使用jquery,并且不会搞乱Tab键顺序:

$(function ()
{
    $("a").each(function() {
        $(this).attr("hideFocus", "true").css("outline", "none");
    });
});

答案 3 :(得分:0)

我认为_noFocusLine可以在IE7中运行

a{
    outline: none;
    _noFocusLine: expression(this.hideFocus=true);
}

我是从here找到的,我自己也试过了。 希望这会对你有所帮助。