【发布时间】:2014-11-15 16:22:27
【问题描述】:
我想得到这个布局:
<------------ Browser Width 100% ------------>
[left][----- center: fixed width -----][right]
中心列具有固定的像素宽度
左右两列平均填充剩余的视口宽度
当视口宽度不够宽时,下面的示例会中断,并且由于固定宽度的中心列,很难获得正确的百分比宽度。
div {
display: inline-block;
background: #F90;
height: 100px;
width: 20%;
}
.center {
width: 500px;
background: #FF0;
}
<div class="left">left (fill available space)</div>
<div class="center">fixed width</div>
<div class="right">right (fill available space)</div>
【问题讨论】: