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

  • 内容
  • 评论
  • 相关
  <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这个属性就搞定。哈哈 是不是很简单呀。

本文标签:这篇文章木有标签

版权声明:若无特殊注明,本文皆为《菜鸟站长》原创,转载请保留文章出处。

本文链接:DIV浮动后父DIV高度自动失效解决方案 - http://wziyi.net/?post=37

发表评论

电子邮件地址不会被公开。 必填项已用*标注