如何在 IE7 中去除链接周围的虚线边框

新手上路,请多包涵

单击时按钮和链接周围有边框。

在此处输入图像描述

在此处输入图像描述

我怎样才能删除它?

原文由 Mo. 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 312
2 个回答

这很丑陋,但大多数 IE 修复程序也是如此。

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

原文由 Karl Laurentius Roos 发布,翻译遵循 CC BY-SA 3.0 许可协议

你可以像这样预设它:

 :focus{
    outline:0; /*removes the dotted border*/
}

但请记住(出于可访问性原因)将 CSS 文件中的样式“稍后”设置为更明显的样式。例如 :

 a:focus, a:active{
    color:#ff5500; /*different color than regular*/
}
input[type=submit]:focus, input[type=submit]:active{
    background-color:#444; /*different color than regular*/
}

原文由 darma 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题