0
<div class="wrapper">

    <div class="inlined">
        <div>first-child</div>
        <div>last-child</div> 
    </div>        

    <div class="inlined">
        <div>first-child-1</div>
        <div>last-child-1</div> 
    </div>        

</div>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

.inlined div:last-child是隐藏的,当它显示时,它的父级会div .inlined增加高度。然后它div .inlined旁边的移动到包装器的底部。

我希望它坚持到顶部。

我有很多div .inlined元素,连续 2 个

http://jsfiddle.net/C3v2k/

4

1 回答 1

1

添加垂直对齐到.inlined

.inlined
{
    vertical-align:top;    
}

http://jsfiddle.net/mowglisanu/C3v2k/1/

于 2012-12-21T03:33:50.013 回答