在显示弹性单元IE10内的断字/自动换行

时间:2015-09-09 11:30:13

标签: css css3 internet-explorer-10 flexbox

在IE10中具有显示弹性的单元格内有问题断字。 它在chrome上表现正确,比较chrome中的小提琴以查看预期的行为。

在该示例中,表中的第一个单元格应该断言,而不是流入下一个单元格。

我尝试了多个单词分词和自动换行(在chrome / mozilla中都不需要)但是它们在IE中不起作用。

任何帮助表示感谢。

jsFiddle

HTML:

<div class="container">
    <div class="table">
        <div class="table-row">
            <div class="table-row-cell">Long string input that we want to word break and not overflow into other cell</div>
            <div class="table-row-cell">short</div>
            <div class="table-row-cell">short</div>
            <div class="table-row-cell">short</div>
        </div>
        <div class="table-row">
            <div class="table-row-cell">normal length</div>
            <div class="table-row-cell">short</div>
            <div class="table-row-cell">short</div>
            <div class="table-row-cell">short</div>
        </div>
    </div>
</div>

CSS:

html, body { padding: 0; margin: 0; }
.container {
    width: 400px;
}
.table {
    display: -webkit-box;
    display: -moz-box;
    display: box;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-flow: column nowrap;
    -moz-flex-flow: column nowrap;
    flex-flow: column nowrap;
    -ms-flex-direction: column;
    -ms-flex-wrap: nowrap;
    -webkit-box-pack: justify;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    box-pack: justify;
    -webkit-justify-content: space-between;
    -moz-justify-content: space-between;
    -ms-justify-content: space-between;
    -o-justify-content: space-between;
    justify-content: space-between;  
}
.table-row {
    display: -webkit-box;
    display: -moz-box;
    display: box;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-flow: row nowrap;
    -moz-flex-flow: row nowrap;
    flex-flow: row nowrap;
    -ms-flex-direction: row;
    -ms-flex-wrap: nowrap;
}
.table-row-cell {
    display: -webkit-box;
  display: -moz-box;
  display: box;
  display: -webkit-flex;
  display: -moz-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-grow: 1;
  -moz-flex-grow: 1;
  flex-grow: 1;
  -ms-flex-positive: 1;
  -webkit-flex-basis: 0;
  -moz-flex-basis: 0;
  flex-basis: 0;
  -ms-flex-preferred-size: 0;
  /*  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
  word-break: break-word;
  -ms-word-wrap: break-word;
  -ms-overflow-wrap: break-word;
  -ms-word-break: break-all;
  -ms-word-break: break-word;*/
  padding: 0.5em;
}

0 个答案:

没有答案