<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
body,
html {
height: 100%;
}
.box {
min-height: 100%;
position: relative;
}
header {
width: 100%;
height: 60px;
background: #334455;
}
.section {
padding-bottom: 110px;
/* height:100px; */
background: #ccc;
}
.footer {
height: 50px;
background: #333;
position: absolute;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div class="box">
<header>
頭部
</header>
<div class="section">
正文區域
</div>
<div class="footer">
底部
</div>
</div>
</body>
</html>