我有以下 jsFiddle:http: //jsfiddle.net/YT5vt/
我希望第二个 DIV (div2) 高度始终为 100%,但减去第一个 DIV 和第三个 DIV。当浏览器调整大小时,只会调整第二个 DIV 的大小。
这里也是代码
HTML
<div class="div1">1</div>
<div class="div2">2</div>
<div class="div3">3</div>
CSS
*{
    margin: 0;
    padding: 0;
}
body, html{
    width:100%;
    height: 100%;
}
.div1{
    width: 100%;
    background: #F00;
    height: 100px;
}
.div2{
    width: 100%;
    background: #FF0;
    height: 100%;
}
.div3{
    width: 100%;
    background: #00F;
    height: 25px;
}