鉴于此HTML:
<div>foo</div><div>bar</div><div>baz</div>
如何使它们像这样显示内联:
foo bar baz
不像这样:
那是另一回事:
div.inline { float:left; } .clearBoth { clear:both; } <div class="inline">1<br />2<br />3</div> <div class="inline">1<br />2<br />3</div> <div class="inline">1<br />2<br />3</div> <br class="clearBoth" /><!-- you may or may not need this -->