SOURCE

console 命令行工具 X clear

                    
>
console
<div class="container">
  <div class="left">
  </div>
  <div class="middle">
    <div class="center">
    </div>
  </div>
  <div class="right">
  </div>
</div>
.container {
  height: 100vh;
  width: 100vw;
  background: #FFF;
  display: flex;
}

.left, .right {
  background: #CCC;
  width: 80px;
  height: inherit;
}

.left {
  /* float: left; */
}

.right {
  /* float: right; */
}

.middle {
  background: red;
  height: 100%;
  flex: 1;
  /* display: flex;
  justify-content: center;
  align-items: center; */
  position: relative;
}

.middle div {
  width: 130px;
  height: 80px;
  background: #FFF;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}