IE6下的效果:
其他浏览器下的效果:
<div style="width:200px;height:50px;background:#ccc;">
<div style="width:100px; height:50px;float:left;margin-left:10px; background:#eee;"></div>
</div>
这个时候的左边距是20px了!
解决方法:
display:inline;
<div style="width:200px;height:50px;background:#ccc;">
<div style="width:100px; height:50px;float:left;margin-left:10px; background:#eee; display:inline"></div>
</div>