0

我只在 Chrome 中遇到了 flex 渲染的问题 - Firefox 和 Safari 都可以。

在此处输入图像描述

它是 Chrome 错误还是自动前缀?

这是我的html:

<div class="row mycab-top">
  <div class="col-sm-5 mycab-top-background">
  </div>
  <div class="col-sm-7">
    <img src="http://res.cloudinary.com/dsie3eeqb/image/upload/v1454572255/mycab2-lg_llfoyn.jpg" class="img-responsive"/>
    <img src="http://res.cloudinary.com/dsie3eeqb/image/upload/v1454572255/mycab3-lg_yaka87.jpg" class="img-responsive"/>
  </div>
</div>

这是我的CSS:

.mycab-top {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}
.mycab-top img {
  margin-bottom: 30px;
}
.mycab-top div:nth-child(2) {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
}
.mycab-top div:nth-child(2) img:nth-child(1) {
  margin-bottom: 30px;
}

.mycab-top-background {
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background: url(http://res.cloudinary.com/dsie3eeqb/image/upload/v1454572255/mycab1-lg_g9s5vs.jpg) no-repeat;
  background-size: 100%;
  background-position-x: -15px;
}

这里还有一个关于 codepen的链接。

4

0 回答 0