变态IE6之奇数BUG

今天做一个项目中要用到圆角自适应容器,写了如下布局

<!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=utf-8″ />
<title>demo</title>
<link href=”style/css/style.css” rel=”stylesheet” type=”text/css” />
<style>
/*box*/
.circbox{border:1px solid #E4E5EA; margin:10px; position:relative}
.circbox b{background: url(style/img/bg_box.png) no-repeat; display:block; position:absolute; width:6px; height:6px; overflow:hidden; font-size:0}
.circbox .tl{ background-position:0px 0px;  left:-1px; top:-1px}
.circbox .tr{ background-position:-6px 0px;  right:-1px;top:-1px }
.circbox .bl{ background-position:0px -6px;  left:-1px; bottom:-1px}
.circbox .br{ background-position:-6px -6px;  right:-1px;bottom:-1px }
.con h3{ font-size:14px;  padding-left:10px; border-bottom:1px solid #ccc; height:24px; }/*将height+border之和变成奇数即可*/
.circbox .con{ padding:10px}
.con ul{ padding:10px;}
</style>
</head>
<body>
<div>
<b></b>
<b></b>
<div>
<h3″>标题</h3>
11111111111<br />
222222222222<br />
33333333333<br />
</div>
<b></b>
<b></b>
</div>
</body>
</html>

在IE6下因为H3导致边框不能对齐,搞了半天,经同事指点,发现原来又是IE6的奇数BUG在作怪,将height+border之和变成奇数即可
图像下载:


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值