去除元素浮动(:after)

》》HTML

<div class="zg_city">

  <div class="zg_left"></div>

  <div class="zg_right"></div

</div>

》》css

.zg_city{ width:100%; height:100%; background-color:#f8f8f8}
.zg_city:after { visibility: hidden; clear: both; display: block; height: 0px; content: "."; }

posted @ 2015-04-22 16:41  菜园子丶  阅读(192)  评论(0编辑  收藏  举报