zoukankan      html  css  js  c++  java
  • IE6/7下移除button、input 默认边框和去掉焦点线

    一、去掉边框:

    看看基本的HTML:

    <div class="wrap">
    	<input type="text" class="input_txt">
    	<input type="submit" value="submit" class="input_btn">
    	<input type="button" value="提交" class="input_btn">
    <div>

    通常解决这样的bug最好的方法就是在button和input的标签外添加一个标签,然后将样式写在这个标签上,并且把button和input的默认样式都去除掉。
    实现方式一:设置CSS:

    <style type="text/css">
    	input{margin:0;padding:0;}
    	.wrap{background-color:#0f0;}
    	.input_txt,.input_btn{border:0 none;}
    </style>


    实现方式二:设置CSS,并使用滤镜:

    <!--[if IE]>
    <style type="text/css">
    	input{margin:0;padding:0;filter:chroma(color=#000000);border:none; }
    	.wrap{background-color:#0f0;}
    </style>
    <![endif]-->

    此种方式貌似会有点问题!待在真实IE7环境中验证。

    二、去掉焦点线:

    <style type="text/css">
    a:focus, *:focus {noFocusLine: expression(this.onFocus=this.blur());}
    </style>


  • 相关阅读:
    最大子串和
    [USACO1.5]数字金字塔 Number Triangles
    数字金字塔
    台阶问题
    取余运算
    数列分段pascal程序
    Java 集合-Collection接口和迭代器的实现
    Java 集合-集合介绍
    Java IO流-File类
    Git学习记录
  • 原文地址:https://www.cnblogs.com/bbsno1/p/3260683.html
Copyright © 2011-2022 走看看