/*清除浮动代码*/ .clearfloat:after{display:block;clear:both;content:"";visibility:hidden;height:0} .clearfloat{zoom:1}
<!--第一个div--> <div class="div1 clearfloat"> <div class="left"> Left </div> <div class="right"> Right </div> </div> <!--第二个div--> <div class="div2"> div2 </div>
时间: 2024-11-05 14:45:17