我可以在背景上显示 DIV 图库吗?

发布于 2024-11-24 05:03:41 字数 95 浏览 3 评论 0原文

我目前正在使用 nivo-slider,问题是,我想要在背景中显示图片。我有立场:绝对但它不起作用。画廊本身位于顶部位置,所有其他 div 都位于其后面。 有什么解决办法吗?

I'm currently using nivo-slider here the problem is, I want the displayed pictures in a background. I have position:absolute but its not working. The gallery itself is in top position and all other divs are behind it.
Is there any solution for this?

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

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

发布评论

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

评论(3

浅浅 2024-12-01 05:03:41

为此使用 css 属性 z-index 对

要显示在背面的元素使用较低的 z-index,例如

z-index:1

,对要显示在顶部的元素使用较高的 z-index

z-index:10

Use css property z-index for this

Use lower z-index for the element you want to appear on the back like

z-index:1

and use higher z-index for the elements you want to appear on top

z-index:10

暗地喜欢 2024-12-01 05:03:41

对不想在幻灯片顶部显示的元素设置更高的 z-index。为了获得完整的跨浏览器支持,请确保将该元素放置在代码中的幻灯片之后。

Set a higher z-index on the elements you wont to show on top of the slideshow. For full cross browser support make sure that the element is placed after the slideshow in the code.

铃予 2024-12-01 05:03:41

为幻灯片元素添加 z-index,而要在背景中显示的元素则不添加 z-index。
例如

.slideshow { z-index: 10;}

add z-index to the slideshow element , while the element to be displayed in background leave it without z-index.
for example

.slideshow { z-index: 10;}

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