去除链接A标签周围的虚线框(IE、Firefox)

一、局部消除

1.可以使用 outline:none 来消除点击链接时的虚线。<a href=”#2″ mce_href=”#2″ style=”display:block;outline:none;”>aaa bb</a>


2.IE使用这三种方法消除链接虚线

(1)<a href=”#1″ mce_href=”#1″ hidefocus=”true”>aaa</a>

(2)<a href=”#1″ mce_href=”#1″ style=”nofocus:expression(this.onFocus=this.blur())”>aaa</a>

(3) <a href=”#1″ mce_href=”#1″onfocus=”blur()”>aaa</a>


二、全局消除        CSS实现

       a{blr:expression(this.onFocus=this.close());} /* 只支持IE,过多使用效率低 */

       a{blr:expression(this.onFocus=this.blur());} /* 只支持IE,过多使用效率低 */

      a:focus { -moz-outline-style: none; } /* IE不支持 */

      a:focus { outline: none; } /*很多网站都会加的属性*/

posted @ 2010-09-29 10:21  jhti  阅读(1112)  评论(0编辑  收藏  举报