去掉点击链接后的虚线框

firefox及标准浏览器下可以用css属性outline:

1
outline:none;/*0也可以*/

IE下如下实现(据说过多使用效率低):

1
2
3
a {
   blr:expression(this.onFocus=this.blur());
}

 

此外还可以使用 hidefocus 属性。

 

webkit内核浏览器(Safari/Chrome)中点击链接后不会有虚线框,这应该是默认样式的问题。如果想让其和IE/Firefox一样点击后留下虚线框可加入以下:

1
2
3
a:visited {
    outline:1px dotted gray;
}

 

posted @ 2014-03-17 11:43  lch880  阅读(161)  评论(0编辑  收藏  举报