多列等高布局
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> .box { width: 600px; border: 2px solid #00f; overflow: hidden; } .clear{ clear: both; } .left, .right { float: left; width: 300px; padding-bottom: 2000px; margin-bottom: -2000px; } .left { background-color: #b0b0b0; } .right { background-color: #cc0; } </style> </head> <body> <p>padding补偿法</p> <div class="box"> <div class="left">我在左边</div> <div class="right">我在右边 <br> 我就是想换几行Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure sit fuga provident earum reprehenderit vitae eos mollitia excepturi necessitatibus deserunt pariatur repellendus omnis ipsa, ab amet, dolor harum consequatur. Hic. </div> <div class="clear"></div> </div> </body> </html>