等高布局
描述:左右两列高度自适应扩展,并且相等;
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>无标题文档</title> <style> body{margin:0;} .wrap{ width:900px;margin:0 auto;overflow:hidden;} .left{width:200px;background:Red;float:left;padding-bottom:10000px;margin-bottom:-10000px;} //主要是靠margin-bottom和padding-bottom .right{width:700px;background:blue;float:right;padding-bottom:10000px;margin-bottom:-10000px;} </style> </head> <body> <div class="wrap"> <div class="left"> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> </div> <div class="right"> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> 页面内容<br/> </div> </div> </body> </html>