【发布时间】:2019-08-02 02:04:35
【问题描述】:
我有这个代码:
.fbox {
display: flex;
flex-direction: row;
justify-content: center;
}
.box {
width: 200px;
height: 200px;
margin: 15px;
border: 1px solid black;
background-color: gray;
}
<div class="fbox">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
而不是得到这个:
我明白了:
据 caniuse 和其他相关来源所述,Internet Explorer 11 应支持 display: flex 和 flex-direction: row。
我测试的版本是:IE 11.1.18343.0
有人知道为什么吗?
【问题讨论】:
-
在我的 IE 浏览器中看起来不错。你确定你用的是IE11?您可以交换版本进行测试
-
@MarcHjorth 这就是
About IE所说的......所以我猜它在撒谎。 -
你检查你的兼容模式了吗? (按 f12 并在选项卡上选择兼容模式或仿真) - 这在我的 ie11 上的 windows 10 上工作正常
-
@Pete 好的,就是这样,基本上是 Windows 10 中的 Internet Explorer 11,默认为 IE 7 的兼容模式...写下你的答案,我会投票给它。
标签: html css flexbox internet-explorer-11