.lf{width:300px;height:300px;background:blue;margin-left:520px;}
.right {
width:120px;
height:500px;
background:#690;
float:right;
clear:both;
}
.right {
width:120px;
height:500px;
background:#690;
float:right;
clear:both;
}
最新回答 / 慕少7532173
給父元素設置overflow:hidden并不是為了溢出隱藏,而是為了觸發BFC。這里寫一下觸發BFC的條件:1. float不為none; 2.position不為relative/static; 3.overflow為hidden/auto/scroll; 4.display為table-cell/table-caption/inline-block . ? 當有些情況下需要觸發BFC又不能設置溢出隱藏overflow:hidden時,可以考慮使用其他屬性來觸發BFC。
2016-08-24