1.代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>三个区域示例</title>
<style> .container { display: flex; justify-content: space-between; width: 100%; } .region { flex: 1; height: 200px; background-color: #f0f0f0; margin: 10px; padding: 20px; box-sizing: border-box; text-align: center; }
</style>
</head>
<body> <div class="container"> <div class="region">区域 1</div> <div class="region">区域 2</div> <div class="region">区域 3</div>
</div> </body>
</html>
2.效果