码迷,mamicode.com
首页 > 其他好文 > 详细

三明治布局

时间:2017-05-06 22:52:51      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:padding   pad   char   pos   utf-8   otto   document   scroll   idt   

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}

header {
position: absolute;
width: 100%;
height: 60px;
top: 0;
background-color: red;
}

.content {
position: absolute;
width: 100%;
top: 60px;
bottom: 60px;
overflow-y: scroll;
overflow-x: hidden;
}

.blue {
height: 2000px;
background-color: blue;
}

.yellow {
height: 2000px;
background-color: yellow;
}

footer {
position: absolute;
width: 100%;
height: 60px;
bottom: 0;
background-color: red;
}
</style>
</head>

<body>
<header></header>
<div class="content">
<div class="blue"></div>
<div class="yellow"></div>
</div>
<footer></footer>
</body>

</html>

三明治布局

标签:padding   pad   char   pos   utf-8   otto   document   scroll   idt   

原文地址:http://www.cnblogs.com/chuanzhi946/p/6818255.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!