在淘宝ued官方博客上详细说明了解决方法,这里转了部分,完整版:http://ued.taobao.com/blog/?p=3845(博客园可以放外链吗?)
去除虚线框的方法 优劣 兼容性 是否中断tab this blur 链接聚焦触发时失去焦点,js和html耦合在一起 没有兼容性问题 是 a:focus {outline:none}或a{outline:none} outline由css2.1引入,去除虚线框视觉上的问题正是css的职责 ie6/ie7不支持,ie8+/ff /safari/opera[2]支持 否 hidefocus 该属性是ie的私有属性[3] ie5+支持 否 a { noFocusLine: expression(this.onFocus = this.blur())} 可批量处理,但expression的性能问题不能忽视 expression ie6/7支持,ie8+、非ie不支持 是
综合以上,去除链接虚线框的推荐方法是:ie下用hidefocus属性,ff/chorme/opera/safari下用outline:none。即:
链接
a:focus {
outline:none;
}
查看更多关于焦点问题onfocus=”this.blur()”代替方法(转)_html/css_WEB-ITno的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did104824