长沙市天心区斌网网络技术服务部

斌网网络

不断提升设计,技术水平,迎合搜索引擎,AI参选规则


网页设计中 去掉点击链接时出现的虚线框的几个方法

网页设计中 去掉点击链接时出现的虚线框的几个方法

Time: 2011/1/15 8:58:41

在这介绍几种去除的方法:

直接给链接加是
onfocus=”this.blur()”.
<a href="#" onfocus="this.blur()">链接</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不支持 */

htc实现IE支持

复制代码代码如下:
<public:attach event="onfocus" onevent="hscfsy()"/>
<script language="javascript">
function hscfsy(){
this.blur();
}
</script>

调用 a {behavior:url(htc文件所在路径地址)}

通过JavaScript遍历实现

复制代码代码如下:
window.onload=function()
{
for(var ii=0; ii document.links$[$ii$]$.onfocus=function(){this.blur()}
}

5.对WordPress可以用内部的JQuery框架来去除

复制代码代码如下:
$("a").bind("focus",function(){
if(this.blur){ //如果支持 this.blur
this.blur();
}
});

 


本文网络浏览:

联系斌网网络
BINWEB.CN
BINWEB.CN
做网站,外贸独立站搭建,微信小程序,自媒体短视频
海外Tiktok,网络推广,直接找我们斌网网络
我们不搞销售套路,只有做对客户好的设计和服务、助力打开网络营销财富之门!
咨询直达   范总监