Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不使用浮动的情况下并排放置 div?我问是因为我读过几次我不应该使用浮点数。或者在这种特殊情况下,浮动仍然是定位元素的最佳方式?
http://jsfiddle.net/9LaJt/
你应该看看:
display: inline-block
正如马克所说,为了避免基线对齐:
vertical-align: top
你有几个选择...