聖杯與雙飛翼布局,聖杯雙飛翼布局

來源:互聯網
上載者:User

聖杯與雙飛翼布局,聖杯雙飛翼布局

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>雙飛翼聖杯</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
border: 0;
}
.a{
float: left;
}
#wrap{
overflow: hidden;
}
#center{
width: 100%;
height: 500px;
background :#f40;
}
#left{
width: 20%;
height: 500px;
background: green;
margin-left: -100%;
}
#right{
width: 30%;
height: 500px;
background: #ccc;
margin-left: -30%;
}

.header,.footer{
width:100%;
background: #666;
height:30px;
clear:both;
}
.bd{
padding-left:150px;
padding-right:190px;
height: 200px;
}
.left{
background: #E79F6D;
width:150px;
float:left;
margin-left:-100%;
position: relative;
left:-150px;
height: 100%;
}
.main{
background: #D6D6D6;
width:100%;
float:left;
height: 100%;

}
.right{
background: #77BBDD;
width:190px;
float:left;
margin-left:-190px;
position:relative;
right:-190px;
height: 100%;
}

</style>
</head>
<body>
<!-- 雙飛翼布局 -->
<div id="wrap">
<div id="center" class="a"></div>
<div id="left" class="a"></div>
<div id="right" class="a"></div>
</div>
<!-- 聖杯布局 -->
<div class="header">Header</div>
<div class="bd">
<div class="main">Main</div>
<div class="left">Left</div>
<div class="right">Right
</div>
</div>
<div class="footer">Footer</div>
</body>
</html>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.