dar*_*rma 49
您可以这样预设:
:focus{
outline:0; /*removes the dotted border*/
}
Run Code Online (Sandbox Code Playgroud)
但请记住(出于可访问性原因)将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*/
}
Run Code Online (Sandbox Code Playgroud)
它很难看,但大多数IE修复也是如此.
a:focus, *:focus {
noFocusLine: expression(this.onFocus=this.blur());
}
Run Code Online (Sandbox Code Playgroud)
首先,我可以看到你的一个标签IE7-bug,而这实际上更像是一个功能.这种虚线的目的outline是让用户能够使用鼠标滚轮或tab键在各种控件之间导航.
在任何情况下,要在"聚焦"时定义元素的样式,请使用CSS :focus选择器.这个轮廓的样式属性是,平凡的outline; outline: 0将阻止焦点轮廓出现.
注意:您可能只想在您的按钮上应用该规则,而不是在所有元素上应用该规则,因为某些用户可能习惯于查看指示焦点的内容,这使得使用上述方法更容易导航.
希望以任何方式帮助.
outlineIE7不支持CSS .那个"浏览器"需要以下CSS表达式:
a {
_noFocusLine: expression(this.hideFocus=true);
}
Run Code Online (Sandbox Code Playgroud)
它也适用于较新的版本.