首页 > 其他 > 详细

三明治布局

时间:2017-05-06 22:27:11      阅读:233      评论:0      收藏:0      [点我收藏+]

<!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>

三明治布局

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!