日期:2014-05-17  浏览次数:20741 次

怎样对齐层中的多个列层
<div style='width:700px'>
<div style='width:700px'>
<div id='1' style='height:100'>1</div>
<div id='2' style='height:150'>2</div>
<div id='3' style='height:120'>3</div>
<div id='4' style='height:180'>4</div>
</div>
</div>

怎样对齐1,2,3,4的顶部.

------解决方案--------------------
将代码改成如下:

HTML code
<div style='width:700px'>
<div style='width:700px'>
<div id='1' style='height:100;float:left;border: 1px solid red'>1</div>
<div id='2' style='height:150;float:left;border: 1px solid red'>2</div>
<div id='3' style='height:120;float:left;border: 1px solid red'>3</div>
<div id='4' style='height:180;float:left;border: 1px solid red'>4</div>
</div>
</div>