由于div4、div5和div6的存在,div2高度为1000像素。我不明白为什么div3没有获得100%的高度,它的高度为0像素。
<div id="div1" class="center" style="width:1024px; height:auto;">
<div id="div2" style="float:left; width:100%; height:auto;">
<div id="div3" style="float:left; width:460px; height:100%; background-image:url(img/bgVictorMonteiro.jpg); background-size:100% auto; background-position:bottom; background-repeat:no-repeat;"></div>
<div id="div4" style="float:left; width:270px; height:1000px;"></div>
<div id="div5" style="float:left; width:25px; height:1000px;"></div>
<div id="div6" style="float:left; width:269px; height:1000px;"></div>
</div>
</div>
body,html {height:100%;}
- Luís P. A.