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

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.middle{
width: 98%;
height: 30px;
border-bottom: 1px solid #d4dbe1;
margin: 20px auto 10px;
}
.btn-border{
display: inline-block;
float: left;
width: 78px;
height: 29px;
border: 1px solid #d4dbe1;
border-bottom: none;
margin-right: 8px;
}
.middle button{
width: 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);

}

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

  1. type="submit" 和type="button"

    今天,小菜鸟又遇到一个问题,当不小心在页面输入框回车一下,结果莫名的页面发出了一个请求. 把问题定位在一个button上,代码是这样写的<button class="btn btn-d ...

  2. :input 匹配所有 input, textarea, select 和 button 元素

    描述: 查找所有的input元素,下面这些元素都会被匹配到. HTML 代码: <form> <input type="button" value="I ...

  3. 编写手机端自适应页面案例,springMVC代码,SpringMVC上传代码,去掉input框中原有的样式,使ios按钮没有圆角,css中的border-radius类似

    1.编写的页面 <%@ page language="java" contentType="text/html; charset=UTF-8"  page ...

  4. input type="submit" 和"button"有什么区别?

    http://www.zhihu.com/question/20839977 在一个页面上画一个按钮,有四种办法: <input type="button" /> 这就 ...

  5. 网站开发进阶(四十四)input type="submit" 和"button"的区别

    网站开发进阶(四十四)input type="submit" 和"button"的区别   在一个页面上画一个按钮,有四种办法: 这就是一个按钮.如果你不写ja ...

  6. <input type="button" /> 和<input type="submit" /> 的区别

    <input type="button" /> 这就是一个按钮.如果你不写javascript 的话,按下去什么也不会发生.<input type="s ...

  7. input type="submit" 和"button"有什么区别

    HTML中<input type="submit" /> 和 <input type="button" /> 主要从元素定义类型.点击触 ...

  8. form表单重复提交,type=“button”和type=“submit”区别

    公司测试提了一个项目后台在IE浏览器下(360,firefox就没问题)出现数据重复的问题,调试了好久终于发现问题所在,也不知道是谁写的代码,醉醉的.... 错误地点: <input type= ...

  9. type="button"和type="submit"的区别

    type="button" ,"submit" 的区别(转) Submit是专门用于提交表单的Button,与Button的区别主要有两点: type=button 就单纯是按钮功能   type=s ...

随机推荐

  1. git 安装与使用场景

    1. 安装 yum install git #自动安装依赖 centos sudo apt-get install git #ubutu http://msysgit.github.io/ #wind ...

  2. Cipher Message

    http://acm.hust.edu.cn/vjudge/contest/view.action?cid=34121#problem/C // File Name: c.cpp // Author: ...

  3. Libvirt 虚拟化库剖析

    讲到向外扩展计算(比如云计算),libvirt 可能是您从未听说过的最重要的库之一.libvirt 提供一种虚拟机监控程序不可知的 API 来安全管理运行于主机上的来宾操作系统.libvirt 本身不 ...

  4. Django 1.6 最佳实践: 如何设置django项目的设置(settings.py)和部署文件(requirements.txt)

    Django 1.6 最佳实践: 如何设置django项目的设置(settings.py)和部署文件(requirements.txt) 作者: Desmond Chen,发布日期: 2014-05- ...

  5. 【S16】了解如何把vector和string数据传给旧的API

    1.尽量使用vector和string替换数组,但是老的代码还是使用数组.如果老的接口期望是数组,怎么办? 需要把vector和string,暴露出数组接口,也就是第一个元素的地址. 2.考虑方法Do ...

  6. linux下登入mysql和加压zip文件

    1.类似于window中cmd登入一样 : mysql -u root -p   ---->  回车 ---> 输入密码  就可以了 2. unzip abc.zip  直接进行解压    ...

  7. Android ListView标题置顶效果实现

    一. 有图有真相     二.实现: 1. 基于ListView分类效果 2. TitleView即标题的处理(创建) 3. 处理TitleView的三种状态 三.源码: 例子下载 实现可以看代码,具 ...

  8. 【JavaScript】关于delete

    delete 只能删除属性,不能删除变量 比如 var m = "haha"; delete m; //false m = "haha";----->wi ...

  9. 【JavsScript】webapp的优化整理

    单页or多页 webapp 现状 优劣之分 网络传输优化 综述 fake页-首屏加速 降低请求数 降低请求量 缓存Ajax/localstorage DOM操作优化 综述 关于页面渲染 减少使用定位属 ...

  10. TP复习16

    'APP_GROUP_LIST' => 'Home,Admin', //项目分组设定'DEFAULT_GROUP' => 'Home', //默认分组 开分组复制上面 AjaxReturn