Skip to content

Latest commit

 

History

History
13 lines (6 loc) · 295 Bytes

清除浮动的方式.md

File metadata and controls

13 lines (6 loc) · 295 Bytes

1.最后一个标签新增 css clear:both

2.父元素 overflow:hidden

3.伪元素

.clearfix:after:clearfix{clear:both;content:'';width:0;height:0;overflow:visible;display:block}

4.双伪元素

.clearfix:after,.clearfix:before{content:'',display:table},.clearfix:after{clear:both}