html - IE10 中的 Flex 收缩

标签 html css flexbox internet-explorer-10

我有一个 block ,其中有一个图像和另一个 block 。

父 block 有display:flex,使图像和子 block 排成一行。

子 block 也有 display:flex,但它形成一个由段落和标题组成的列。

http://codepen.io/anon/pen/qNmYRq

.summary__testimonial{
    display: -ms-flexbox;
    display: flex;
    padding-bottom: 120px;
    padding-top: 35px;
    max-width: 100%;
}

.summary__testimonial-right{
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction:column;
    flex-direction:column;
    box-sizing: border-box;
    max-width: 100%;
    -ms-flex-negative:1;
    flex-shrink:1;
    -ms-flex-pack:center;
    justify-content:center;
    width: auto;
}

问题是文本段落在 IE 10 中溢出了他的 parent 。

我尝试设置 max-width:100%width:autobox-sizing:border-box、更改 flex-shrink 值为 10

如果您在 IE 10 中打开它,它仍然会溢出或变成单行,这是您最有可能在 codepen 中看到的内容。

有什么方法可以让它在 IE 10 中看起来和普通浏览器中一样吗?

最佳答案

在 IE10 中,flex-shrink 的等效项是 -ms-flex-negative

例如,

-ms-flex-negative: 0;

关于html - IE10 中的 Flex 收缩,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38146628/

相关文章:

javascript - jQuery 数据表 "No Data Available in Table"

php - 创建 HTML 表单来搜索 SQL 数据库

javascript - 如果我想保留来自外部的事件,但防止自定义事件冒泡,如何隐藏 DOM

html - Flex/Grid 布局不适用于按钮或字段集元素

javascript - 如何按顺序检索特定 DOM 元素的所有 index() 值

android - 在phonegap中提交表单后获取JSON对象

html - Chrome 搜索输入宽度与文本输入不同

javascript - 图像旋转器脚本未按顺序进行

html - 文本溢出 : ellipsis not working in a nested flex container

Angular 2 弹性布局高度 100%