【发布时间】:2013-05-24 09:56:04
【问题描述】:
基本上在 IE10 中,当“方向”为一行时,文本比其父元素宽的 p 元素将溢出,随后将任何其他兄弟元素推出容器。换行在列模式下似乎可以正常工作(您可以在 Chrome 中查看相同的 jsfiddle 并查看其行为是否符合预期)。
<div id="flex-one">
<p>Some extra long content (for the container) that correctly wraps!</p>
<aside>Content</aside>
</div>
<div id="flex-two">
<p>Some extra long content (for the container) that incorrectly wraps!</p>
<aside>Content</aside>
</div>
div {
width: 250px;
padding: 1em;
background: blue;
display: -webkit-flex;
display: -ms-flexbox;
margin-bottom: 1em;
}
#flex-one {
-webkit-flex-flow: column;
-ms-flex-direction: column;
}
#flex-two {
-webkit-flex-flow: row;
-ms-flex-direction: row;
}
p {
margin: 0;
padding: 0;
background: yellow;
}
aside {
background: red;
}
关于如何纠正这种行为以使其不会溢出容器的任何想法? (不提供固定的 with,因为这是在流体布局中使用的)。
【问题讨论】: