zoukankan      html  css  js  c++  java
  • 使用CSS表达式去除超链接的虚框的一些方法

    去除超链接的虚框的一些方法 

    1. a{ 


    blr:expression(this.onFocus=this.blur());/*IE使用*/ 
    outline-style:none;/*FF使用*/ 
    } /*去除a标签带来的虚框*/ 
    2、全 局控制  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 onfocus=this.blur() href="javascript:void(0)" class="l-button" style="80px" onclick='log_1()'> 
    <img id="img_a" border=0 align="middle" src="login_image/a_1.jpg" alt="没有图片!"> </img> 
    </a> 
    onfocus=this.blur()  增加这个,可以去掉! 

    方法二: 
    1.把以下代码存成一个1.htc的文件
    <public:attach event="onfocus" onevent="quit()" /> 

    <script language="javascript"> 
    function quit(){ 
    this.blur(); 

    </script> 
    2.在你的html文件head中加入以下代码,这样所有的连接都没虚线了
    <style> 

    a {behavior:url(1.htc)} 
    area {behavior:url(1.htc)} 
    </style> 

    总结方法:
    去掉链接时的虚框只要在你的样式表中加入以下代码,就可以去掉链接时烦的的虚框   
    a,area { blr:expression(this.onFocus=this.blur()) } /* for IE */
    :focus { -moz-outline-style: none; } /* for Firefox */   
  • 相关阅读:
    北风设计模式课程---13、享元模式
    北风设计模式课程---观察者模式2
    北风设计模式课程---观察者模式
    北风设计模式课程---12、观察者模式
    Linux下yum订购具体解释
    不黑诺基亚,他们觉得萌萌达
    System.Threading.ThreadStateException
    SRS微信号和QQ组
    hibernate它 10.many2many单向
    UML 简单的总结
  • 原文地址:https://www.cnblogs.com/tomorrow-cassie/p/4135580.html
Copyright © 2011-2022 走看看