左侧或右侧的CSS位置不适用于ie11

时间:2017-12-01 14:11:26

标签: html css flexbox css-position internet-explorer-11

绝对左侧或右侧的位置在Internet Explorer 11(IE11)中没有显示.box背景颜色,同时所有其他浏览器都正常工作(请查看附带的屏幕截图)

不幸的是我不能放宽度。因为图像数量可能会有所不同

演示:https://codepen.io/anon/pen/qVLyaM

enter image description here enter image description here enter image description here enter image description here



body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrap {
  display: block;
  padding: 1rem;
  border: 1px solid black;
  background-color: deepskyblue;
  width: 700px;
  height: 300px;
  position: relative;
}

.box {
  display: inline-flex;
  background-color: tomato;
  padding: 1rem;
  position: absolute;
  left: 0;
  left: 100%;
  bottom: 100%;
}

<div class="wrap">
  <div class="box">
    <div class="box-img"><img src="http://via.placeholder.com/100x100?text=Logo 01"></div>
    <div class="box-img"><img src="http://via.placeholder.com/100x100?text=Logo 01"></div>
    <div class="box-img"><img src="http://via.placeholder.com/100x100?text=Logo 01"></div>
    <div class="box-img"><img src="http://via.placeholder.com/100x100?text=Logo 01"></div>
    <div class="box-img"><img src="http://via.placeholder.com/100x100?text=Logo 01"></div>
    <div class="box-img"><img src="http://via.placeholder.com/100x100?text=Logo 01"></div>
    <div class="box-img"><img src="http://via.placeholder.com/100x100?text=Logo 01"></div>
  </div>
</div>
&#13;
&#13;
&#13;

0 个答案:

没有答案