IE6 双倍边距 Bug

CSS

*{
    margin: 0px;
    padding: 0px;
}
.list{
    width: 200px;
    height: 200px;
    background: blue;
    float: left;
    margin-left: 30px;
}

HTML

<div class="list"></div>
<div class="list"></div>
<div class="list"></div>
<div class="list"></div>

解决前
1.jpg

解决方法:给第一个DIV加上样式

display:inherit;

CSS

*{
    margin: 0px;
    padding: 0px;
}
.list{
    width: 200px;
    height: 200px;
    background: blue;
    float: left;
    margin-left: 30px;
}

HTML

<div class="list" style="display:inline;"></div>
<div class="list"></div>
<div class="list"></div>
<div class="list"></div>

解决后
2.jpg

仅有 1 条评论
  1. 瞧瞧

添加新评论