解决方法
这是一个工作示例:
jsfiddle
jsfiddle
HTML:
<div class="container"> <div class="first">first</div><div class="third">third</div> <div class="second">second</div><div class="fourth">fourth</div><div class="last">last</div> </div>
CSS:
html,body,.container { height: 100%; min-height: 100%; } .first { float: left; width: 20%; height: 30%; background-color: red; } .second{ float: left; width: 20%; height: 70%; background-color: green; } .third{ float: right; width: 80%; height: 80%; background-color: blue; } .fourth { float: right; width: 40%; height: 20%; background-color: #DDDDDD; } .last{ float: right; width: 40%; height: 20%; background-color: yellow; }