<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.main{font-size:0;} /* 去掉行内块受换行符的影响*/
.left{display:inline-block;width:200px;height:500px;background-color:red}
.middle{display:inline-block;width: calc(100% - 420px);height:500px;background-color:#000;margin:0 10px;}
.right{display:inline-block;width:200px;height:500px;background-color:red}
</style>
</head>
<body>

<div class="main">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
</div>

</body>
</html>

相关文章:

  • 2021-07-23
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-08-16
  • 2021-11-08
  • 2021-05-17
猜你喜欢
  • 2021-08-26
  • 2021-07-09
  • 2021-11-27
  • 2022-12-23
  • 2021-11-05
相关资源
相似解决方案