CSS:将新行放在上面,而不是下面 [英] CSS: Make new line go above, not below
问题描述
我有一个 div
有一些浮动的孩子。当 div
的宽度变满时,它继续到新行 第一行(这是正常的预期行为)。 JSFiddle显示我在说什么。
我希望继续使用高于第一行,而是继续流程。只有 CSS 可以实现这一点吗?
编辑:这是一个新链接,其中包含它的作用和我想要的操作EDIT2: http://jsfiddle.net/YnKzL/ =nofollow>这里是一个更多元素的示例
向子元素添加 clear:both;
。这将强制每个孩子使用自己的行。
更新:
I have a div
that has some floated children. When the div
's width becomes full, it continues to a new line, below the first line (which is the regular, expected behavior). JSFiddle to show what I am talking about.
I want it continue onto a new line above the first line instead following the flow. Is this possible with just CSS? How can I achieve this?
EDIT: Here is a new link with what it does and what I want it to do
EDIT2: Here is an example with more elements
Add clear: both;
to the child elements. That will force each child to it's own line.
Update:
这篇关于CSS:将新行放在上面,而不是下面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!