<!--
* @Author: ShuangxuNian
* @Date: 2022-10-29 22:23:41
* @LastEditors: ShuangxuNian
* @LastEditTime: 2022-10-29 23:33:25
* @Description:
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html, body {
margin: 0;
border: 0;
padding: 0;
width: 100%;
height: 100%;
}
.f {
height: 100%;
width: 100%;
background-color: red;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.a {
height: calc(100% - 100px);
width: 100%;
background-color: yellow;
}
.b {
height: 100px;
width: 100%;
background-color: green;
}
</style>
<title>Document</title>
</head>
<body>
<div class="f">
<div class="a"></div>
<div class="b"></div>
</div>
</body>
</html>