解决子元素浮动,父元素没有撑开的问题

/*子元素浮动,父元素撑开*/
.父元素{
    
 }
.父元素:before{
    content:"";
    display:table;
}
.父元素:after{
    content:"";
    display:table;
    clear:both;
}

猜你喜欢

转载自www.cnblogs.com/zoeeying/p/10368546.html