【发布时间】:2019-08-02 05:14:08
【问题描述】:
我正在尝试这个:
html,body{
background-color: black;
margin: 0;
padding: 0;
}
.wp {
margin: 20px auto;
width: 300px;
}
.a {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
border: 2px solid red;
}
.ai {
width: 100%;
}
.im {
outline: 2px solid yellow;
}
<div class="wp">
<div class="a">
<div class="ai">
<img class="im" width="100%" src="https://www.nasaspaceflight.com/wp-content/uploads/2018/10/2018-10-22-13_27_15-Window.jpg">
</div>
</div>
</div>
我在 EDGE 与 IE 11 中得到不同的结果:
图中左边是EDGE,右边是IE11。
我尝试按照Flexbugs 的建议在div 中包含img,但得到了相同的结果。
任何想法如何修复 IE11 版本?
【问题讨论】:
标签: css flexbox internet-explorer-11 microsoft-edge