close
文章出處
這個寫法不是我發明的。也是在網上找了寫資料寫出來的。經過測試 兼容ie 6 7 8 FF 谷歌瀏覽器!
主要思路是:正內下邊距+負外下邊距
.e {padding-bottom: 32767px; margin-bottom: -32767px;}
完整代碼:
代碼
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>多列等高 idche</title>
<style type="text/css">
.main {overflow: hidden; width: 800px; margin: 0 auto;}
.left {float: left; width: 250px;}
.center {float:left; margin-left:5px; width:295px;}
.right {float: right; width: 245px;}
.e {padding-bottom: 32767px; margin-bottom: -32767px;}
.box {background: #F5E2AF; border: 1px #FB9D51 solid;}
</style>
</head>
<body>
<div class="main">
<div class="left e">
<div class="box">123546<br/></div>
<div class="box">123546<br/>123546<br/>123546<br/></div>
<div class="box">123546<br/></div>
<div class="box e">123546<br/>123546<br/>123546<br/>123546<br/>123546<br/>123546<br/></div>
</div>
<div class="center e">
<div class="box">123546<br/>123546<br/></div>
<div class="box">123546<br/></div>
<div class="box">123546<br/>123546<br/></div>
<div class="box e">123546<br/>123546<br/>123546<br/>123546<br/></div>
</div>
<div class="right e">
<div class="box">123546<br/>123546<br/></div>
<div class="box">123546<br/>123546<br/>1235412354123546<br/></div>
<div class="box">123546<br/>123546<br/></div>
<div class="box e">123546<br/></div>
</div>
</div>
</body>
</html>
不含病毒。www.avast.com |
全站熱搜
留言列表