覆盖当前由柔韧性框占据的图像

时间:2018-12-15 09:53:47

标签: css flexbox

我当前正在尝试用新图像覆盖旧图像,该图像当前正在使用flex box占用,并且如果我尝试将图像放置在相同的覆盖位置上 ,我最终将一些旧图像和新图像占用了空间。

图像样式如何:

  &__image {
    flex: 8;
    height: rem(280);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    order: 1;
    overflow: hidden;


    @include mq($from: s-screen) {
      height: 100%;
      order: 2;
      width: 67%;
    }
  }

和叠加样式:

  &__overlay {
    opacity: 0;
    flex: 8;
    height: rem(280);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    order: 1;
    transition: opacity 2000ms ease-in;

    @include mq($from: s-screen) {
      height: 100%;
      order: 2;
      width: 67%;
    }
  }

这不完全相同...覆盖层有效,我无法覆盖Flexbox顶部

0 个答案:

没有答案