<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>多个div,高度自适应100%</title>
<style type="text/css">
*{margin: 0;padding:0}
#wrapper div{
width: 100%;
color:#fff;
}
.header {background:orange; height:50px; position: fixed;top: 0;}
.header2{background:purple; height:50px; position: fixed;top: 50px;}
.bodyer {background:silver; height:auto; position: fixed;top: 100px;bottom: 100px}
.footer {background:orange; height:50px; position: fixed;bottom: 0}
.footer2{background:maroon; height:50px; position: fixed;bottom: 50px}
</style>
</head>
<body>
<div id="wrapper">
<div class="header">脑袋瓜</div>
<div class="header2">脑袋瓜2</div>
<div class="bodyer">身体</div>
<div class="footer">脚丫子</div>
<div class="footer2">脚丫子2</div>
</div>
</body>
</html>
css控制宽度(高度)自适应100%
需积分: 50 141 浏览量
2015-03-04
15:44:02
上传
评论 1
收藏 1KB RAR 举报
oMonsterbeats
- 粉丝: 1
- 资源: 1