+ -
当前位置:首页 → 问答吧 → 求解css背景链接虚线框如何去掉?

求解css背景链接虚线框如何去掉?

时间:2010-04-17

来源:互联网

如题:禁止js的方法!

作者: jgfpkpk   发布时间: 2010-04-17

firefox 是 a{outline:0}

作者: singlesoho   发布时间: 2010-04-17

貌似,IE私有的 <a href="#" hidefocus="true" ....可以解决问题。

作者: yoom   发布时间: 2010-04-17


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> a:active, a:focus { outline:none;} </style> </head> <body> <a href="#" hidefocus="true">aaaaa</a> </body> </html>
 提示:您可以先修改部分代码再运行
这样的~

作者: YOOYOCN   发布时间: 2010-04-18

如果按3楼所说的这样做也不好,还不如用JS

作者: longjianghu   发布时间: 2010-04-19

还有内置span触发hasLayout和onfocus事件的方法,各有利弊,但两害相较取其轻,个人觉得3楼的办法更合适点。

作者: 14px   发布时间: 2010-04-19

复制内容到剪贴板
代码:
a{blr:expression(this.onFocus=this.blur());outline:none; text-decoration:none;}
试试这个

作者: tianlanbb   发布时间: 2010-04-20

onFocus=this.blur();  这个代码IE6好像不识别

作者: rubyz   发布时间: 2010-09-07