我当前正在尝试用新图像覆盖旧图像,该图像当前正在使用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顶部