Jquery中文网 www.jquerycn.cn
Jquery中文网 >  CSS教程  >  经典实例  >  正文 IE 6 7 display:inline-block多一像素解决方法

IE 6 7 display:inline-block多一像素解决方法

发布时间:2020-05-12   编辑:www.jquerycn.cn
jquery中文网为您提供IE 6 7 display:inline-block多一像素解决方法等资源,欢迎您收藏本站,我们将为您提供最新的IE 6 7 display:inline-block多一像素解决方法资源

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;  charset=gb2312" />
<title>无标题文档</title>
<style type="text/css教程">
.tab-box{border:1px #d1eacc solid;width:215px;margin:0 auto;}
.tab-box .btn{margin:1px;cursor:pointer;font-size:0;}
.btn span{background:#f2fde2;width:105px;text-align:center;height:29px;line-height:29px;color:#4ca72d;display:inline-block;font-size:12px;overflow:hidden;padding:0;margin:0;}
</style>
</head>
<body>
<div class="tab-box">
       <div class="btn clearfix">
         <span>最新导读</span>
            <span>热点关注</span>
        </div>
      </div>
</body>
</html>

元素之间不应该有间歇(包括换行和空格,如果要兼容ie系列就必须用浮动了)

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
*{margin:0;padding:0;}
.tab-box{border:1px #d1eacc solid;width:210px;margin:0 auto;}
.tab-box .btn{cursor:pointer;font-size:0;}
.btn span{background:#f2fde2;width:105px;text-align:center;height:29px;line-height:29px;color:#4ca72d;display:block;font-size:12px;float:left;
</style>
</head>
<body>
<div class="tab-box">
       <div class="btn clearfix">
        <span>最新导读</span>
            <span>热点关注</span>
           <p style="clear:both;height:0;"></p>
        </div>
      </div>
</body>
</html>

您可能感兴趣的文章:
IE下块元素如何实现display:inline-block
解决ie7下display: inline-block失效的BUG
IE 6 7 display:inline-block多一像素解决方法
css中去除inline-block元素间间距多种方法分享
总结网页制作中闭合浮动元素的几个方法
当INLINE-BLOCK和TEXT-INDENT遇到IE6,IE7
CSS浏览器兼容性问题及解决方案
Go 语言的错误处理机制
css中负Margin你不知道的秘密
css padding在ie7、ie6、firefox中的兼容问题

[关闭]