如何去掉链接的虚线边框

| |
[不指定 2008/01/23 14:24 | by Space.As ]
也许你会觉得当点击时焦点出现的虚线很不好看,那就让我们把它去掉吧!

一,在<a>标签中加入onFocus="this.blur()"语句:
-----------------------------------------------------------
<a href="#" onFocus="this.blur()">try</a>
-----------------------------------------------------------

二,在<a>标签中加入hidefocus:
-----------------------------------------------------------
<a href="###" hidefocus>link</a>
-----------------------------------------------------------

三,如果连接太多,可以用外部链接 .HTC 文件。
如,blur.htc 文件内容如下:
----------------------------------------------------------
<public:attach event="onfocus" onevent="makeblur()"/>
<script language="javascript">
function makeblur(){
this.blur();
}
</script>
-----------------------------------------------------------
在 CSS 中加入如下代码:
-----------------------------------------------------------
A { behavior:url(blur.htc); }
-----------------------------------------------------------

四,使用CSS样式,可加入代码:
-----------------------------------------------------------
a {blr:expression(this.onFocus=this.blur())}

或者
a{outline:none}
也可以实现去虚线。
-----------------------------------------------------------
这样,站内所有的文章都实现了无虚线效果了。

Tags: , , , ,
学习笔记 | 评论(0) | 引用(0) | 阅读(1614)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]