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 */   
  • 相关阅读:
    关于json前后台传值
    [LeetCode] #29 Divide Two Integers
    [LeetCode] #28 Implement strStr()
    [LeetCode] #27 Remove Element
    [LeetCode] #26 Remove Duplicates from Sorted Array
    [LeetCode] #25 Reverse Nodes in k-Group
    [LeetCode] #24 Swap Nodes in Pairs
    [LeetCode] #23 Merge k Sorted Lists
    [LeetCode] #22 Generate Parentheses
    [LeetCode] #21 Merge Two Sorted Lists
  • 原文地址:https://www.cnblogs.com/tomorrow-cassie/p/4135580.html
Copyright © 2011-2022 走看看