欢迎来到PHP菜鸟博客    登录
我的订单    |  会员中心  
     
就算这个世道烂成一堆粪坑,那也不是你吃屎的理由!!
购物车

首页 > 网站前端 > 产品详情

DIV浮动后父DIV高度自动失效解决方案

 

9999.00    (库存:有货)

已超出库存数量!

  • 详情
  <div style="width:720px;margin:0 auto;background:red;overflow:hidden;">
   <div style="float:left;">
   <img  src="__ROOT__/public/images/1.png" style="width:90px;height:90px;"><br/>
   继续挑选礼品
   </div>
   <div style="float:left;margin-left:60px;">
   <img src="__ROOT__/public/images/2.png"  style="width:90px;height:90px;" ><br/>
   去购物车结算
   </div>

 </div>



总结:其实很简单 只需要在父DIV中加入overflow:auto或overflow: hidden这个属性就搞定。哈哈 是不是很简单呀。