- 利用calc()实现三栏自适应布局
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.box {
height: 500px;
background-color: pink;
}
.box p {
float: left;
}
/* 左右两栏 */
.box p:nth-child(1),
.box p:nth-child(3) {
width: 200px;
height: 480px;
background-color: red;
}
/* 中间 */
.box p:nth-child(2) {
height: 480px;
background-color: green;
/* calc运算 */
width: calc(100% - 400px);
}
</style>
</head>
<body>
<div class="box">
<p>左边</p>
<p>中间</p>
<p>右边</p>
</div>
</body>
</html>
```