第一种:(纯flex)
<!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">
<title>Document</title>
</head>
<body>
<div style="height: 100vh; display: flex; flex-direction: column;">
<div style="flex: 1 50%; background-color: red;"></div>
<div style="flex: 1 50%; display: flex;">
<div style="background-color: green; flex: 1;"></div>
<div style="background-color: blue; flex: 1;"></div>
</div>
</div>
</body>
</html>
第二种:子项用height撑开
<