<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
<style type="text/css">
body{margin: 0;}
.wrap{float: left;border: 10px solid red;background: yellow;}
/*
bug:当子块级元素有浮动且有横向margin值时,子块级元素在浮动方向的margin值,扩大两倍。
解决方法:如下注释部分↓↓
*/
.box{float: left;width: 100px;background: blue; height: 100px;border: 5px solid black;margin: 0 100px;/*displayinline;*/}
</style>
</head>
<body>
<div class="wrap">
<div class="box"></div>
</div>
<div class="test"></div>
</body>
</html>
05_02.IE6双边距bug
最新推荐文章于 2024-07-10 09:28:00 发布