• input[type='submit']input[type='button']button等按钮在低版本的IE下面,去掉黑色边框的问题


    今天做一个tabs效果的时候,发现上面的button在低版本下会出现黑色的边框,很难看,于是我整理了下几个去掉黑色边框的办法:

    1、在button的外层嵌套一个div,设置button的border:none;

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
    .middle{
    98%;
    height: 30px;
    border-bottom: 1px solid #d4dbe1;
    margin: 20px auto 10px;
    }
    .btn-border{
    display: inline-block;
    float: left;
    78px;
    height: 29px;
    border: 1px solid #d4dbe1;
    border-bottom: none;
    margin-right: 8px;
    }
    .middle button{
    78px;
    height: 29px;
    background: #f5f6f8;
    border: none;
    margin-left: 0;
    cursor: pointer;
    }
    </style>
    </head>
    <body>
    <div class="middle">
    <div class="btn-border">
    <button><a href="#">tabs-1</a></button>
    </div>
    <div class="btn-border">
    <button><a href="#">tabs-2</a></button>
    </div>
    <div class="btn-border">
    <button><a href="#">tabs-3</a></button>
    </div>
    <div class="btn-border">
    <button><a href="#">tabs-4</a></button>
    </div>
    </div>
    </body>
    </html>

    2、如果是IE浏览器,则过滤input元素中的黑色。

    <!--[if IE]>

    <style type="text/css">

    input {

    filter:chroma(color=#000000);

    }

    </style>

    <![endif]-->
    因为这个问题,存在所有按钮上,为了一劳永逸,建议在reset.css样式中加入:

    input[type=submit],

    input[type=reset],

    input[type=button]{

    filter:chroma(color=#000000);

    }

  • 相关阅读:
    JS基础_自增和自减
    计算机组成原理
    SyntaxHighlighter
    10个经典的C语言面试基础算法及代码
    知名互联网公司面试题
    计算机网络基础知识(笔试题)
    面试准备之常见上机题目搜罗
    小米2013年校园招聘笔试题-简单并查集
    2014华为上机试题
    C++学习笔记
  • 原文地址:https://www.cnblogs.com/ww-ervin-72/p/5052525.html
Copyright © 2020-2023  润新知