1、将页面高度按百分比来分配
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta charset="utf-8">
<title>百分比</title>
<style type="text/css">
html,body {
height: 100%;
}
.head{
background-color: #3397DE;
height:15%;
}
.body-content{
background-color: #EBEFF1;
height:75%;
}
.footer{
background-color: #3397DE;
height:10%;
}
</style>
</head>
<body>
<div class="head"></div>
<div class="body-content"></div>
<div class="footer"></div>
</body>
</html>