html,
body {
height: 100%;
width: 100%;
overflow: hidden;
}
.page .header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 5%;
background-color: #0094ff;
color: #ffffff;
}
.page .body {
position: fixed;
top: 5%;
left: 0;
right: 0;
bottom: 20px; // same as the footer height
}
.page .body .content {
height: 100%;
overflow: auto;
}
.page .footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 20px;
text-align: center;
}
// 标记
<body class="page"> // add class page to body
<section class="header">
<div class="full-height as-inline-block">
Header
</div>
</section>
<section class="body">
<div class="content">
Page body
</div>
</section>
<section class="footer">
footer
</section>
</body>