【发布时间】:2013-01-10 09:05:48
【问题描述】:
如何将包装元素中的两个元素向右浮动,在视觉和语义上保持元素的相同顺序?
<style>
.container { widht: 200px; height: 50px; background: #333; }
.container p { width: 50px; height: 50px; background: #f00; float: right; margin: 0; }
</style>
<div class="container">
<p class="a">Simon</p>
<p class="b">Says</p>
</div>
渲染时,这将使内部元素按“Says Simon”的顺序出现,http://jsbin.com/eravan/1/edit。
【问题讨论】: