您的位置:首页 > 其它

去掉点击链接,a链接过后产生的虚线框

2010-09-16 13:00 330 查看
方法一:

定义样式outline:none即可,但此法只适应于FF,IE不支持,在IE 下可使用其私有的html属性:hideFoucs,在标签的结构中加入 hidefocus=”true” 属性。

Css代码

<a href=

"#"

hidefocus=

"true"

>这里放置您需要的文字或图片</a>

<a href="#" hidefocus="true">这里放置您需要的文字或图片</a>


方法二:

针对于IE

Css代码

.HideFocus {

hide-focus: expression(this.hideFocus=true); /* for ie 5

+ */

outline: none; /* for firefox 1.5

+ */}

.HideFocus {
hide-focus: expression(this.hideFocus=true);  /* for ie 5+ */
outline: none;  /* for firefox 1.5 + */}

但是expression性能极差,如果不是特别需求,全部页面链接点击所产生的虚线框都必须去掉,尽量不要用这种方法。

/*清除a链接过后的虚线*/

a:active, a:focus {-moz-outline:none;outline:none;ie-dummy:expression(this.hideFocus=true);}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: