用純CSS實現三列DIV等高布局的方法

來源:互聯網
上載者:User
散列等高<body>
<div id="wrap">
  <div id="left">
    <p style="height:500px">style="height:500px"</p>
  </div>
  <div id="center">
    <p style="height:600px">style="height:600px"</p>
  </div>
  <div id="right">
    <p style="height:700px">style="height:700px"</p>
  </div>
</div>
</body> CSS<style type="text/css">
* {
margin:0;
padding:0;
}
#wrap {
overflow:hidden;
width:1000px;
margin:0 auto;
}
#left, #center, #right {
margin-bottom:-10000px;
padding-bottom:10000px;
}
#left {
float:left;
width:250px;
background:#777;
}
#center {
float:left;
width:500px;
background:#888;
}
#right {
float:right;
width:250px;
background:#999;
}
p {color:#FFF;text-align:center}
</style>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.