如何在 moving-boxes 插件中将 .current 置于前面

发布于 2024-12-17 10:27:01 字数 458 浏览 1 评论 0原文

这是我正在处理的页面: http://dontapscott.patienceandfortitude.com/ about/#&slider1=6

我正在使用 来自 css-tricks 的移动框插件。我正在尝试找出如何将非当前幻灯片放在当前幻灯片后面。

正如您在默认实现中所看到的,幻灯片周围有一个边距,我希望它们重叠。我尝试使用负边距,它可以使它们重叠,但下一张幻灯片仍然位于当前幻灯片的前面,尽管对 .current 幻灯片应用了高 z 索引,对所有其他幻灯片应用了低 z 索引。

非常感谢您提供的任何见解。

Here is the page I'm working on: http://dontapscott.patienceandfortitude.com/about/#&slider1=6

I'm using the moving boxes plugin from css-tricks. I'm trying to figure out how to bring the non-current slides in behind the current one.

As you can see in the default implementation, there's a margin around the slides and I'd like them to overlap instead. I tried this using negative margins and it works to make them overlap, but the next slide remains in front of the current one, despite applying a high z-index to the .current slide and a low one to all others.

Many thanks for any insight you can offer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

此岸叶落 2024-12-24 10:27:01

尝试将您的 .current 选择器更改为:

.mb-slider .mb-panel.current {
    cursor: auto;
    z-index: 100;
    position: relative;
}

Try changing your .current selector to this:

.mb-slider .mb-panel.current {
    cursor: auto;
    z-index: 100;
    position: relative;
}
简单气质女生网名 2024-12-24 10:27:01

您可以尝试将 position:relative 添加到您的 .current 选择器以及您之前尝试过的 z-index

You could try adding position:relative to your .current selector along with the z-index that you tried previously.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文