/*子元素浮動,父元素撐開*/ .父元素{ } .父元素:before{ content:""; display:table; } .父元素:after{ content:""; display:table; clear:both; }