问题描述
我正在尝试构建一个水平滑块,在其顶部具有固定的图形元素(箭头)。根据幻灯片,箭头应在幻灯片前面向后滚动。箭头的位置固定。滑块中的幻灯片位于绝对位置。
我希望箭头会在“ gallery-image-1”前面滚动,并在“ gallery-image-2”后面滚动(因为幻灯片的z-index值更高)。情况并非如此。
有人对如何解决这个问题有建议吗?
.arrow {
position: fixed;
z-index: 1;
}
.gallery-image-1 {
position: absolute;
z-index: 0;
}
.gallery-image-2 {
position: absolute;
z-index: 2;
}
<div class="arrow"></div>
<div class="gallery">
<div class="gallery-scroll-track">
<div class="gallery-container">
<div class="gallery-track">
<section class="gallery-image-1"></section>
<section class="gallery-image-2"></section>
</div>
</div>
</div>
</div>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)