效果图

 

<!DOCTYPE html>
<html>	
<head>
<meta charset="utf-8"> 
<title>菜鸟教程(runoob)</title> 
<style> 
	*{padding:0px;margin:0px;}
	html,body{
		height: 100%;
	}
.box {
  display: flex;
  flex-flow: column;
  height: 100%;
}

.header {
  background: dodgerblue;
  height: 50px;
}

.auto-fill {
  background: wheat;
  flex: 1
}
</style>
</head>
<body>

<div class="box">
  <div class="header">头部</div>
  <div class="auto-fill">自动填充</div>
</div>

</body>
</html>

更多推荐

css 高度自动填充布局