http://jsfiddle.net/pvJRK/2/IE10 Flexbox的P元素的非包裹
基本上在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;
}
有关如何纠正这种行为,以便它不会溢出它的容器的任何想法? (不提供固定的,因为这用于流体布局)。
谢谢发布!我遇到了这个问题,但它是所有块级印刷元素 - 段落和标题。这让我疯狂! – chipcullen
我想指出的原因是因为IE10和11对flex项目有不同的默认值。这仅仅是因为IE是无用的。 –
正如你可以阅读[here](http://caniuse.com/#search=flex),IE10的默认值是'flex:0 0 auto;'。 –