如何让 Jquery 循环正确淡出单独的 div,一个在另一个之上

发布于 2024-12-13 18:52:30 字数 446 浏览 5 评论 0原文

浏览了其他帖子,但找不到任何适合我的问题的帖子(至少有答案)。这是:

我有一组图像,我正在使用 jquery 循环来循环淡入和淡出。效果很好!但我想做的是让另一个 div (这是一个关于图像的标题)浮动在顶部。这个“标题”div 也会随着每个图像而淡出,以便相应的标题随每个图像一起显示。

当然,我可以只将标题作为图像的一部分,但我希望保留 HTML 提供的易于编辑的功能。

我已经设法让幻灯片在图像和标题 div 上运行,但问题是图像一直出现在标题之上,有效地隐藏了标题(当图像半透明时,我可以看到标题在下面过渡)在淡入下一个图像期间)。

那么,有谁知道如何让标题出现在顶部吗? (顺便说一句,如果我没有在标题上运行幻灯片,它会成功地保留在图像转换的顶部。不幸的是,标题不会以这种方式更改!)。

您可以提供的任何帮助(即使是不同的插件)将不胜感激!

希望这是有道理的,并提前致谢。

had a look through other posts and couldn't find any (with answers at least) that fit my problem. Which is:

I have a group of images that I am using jquery cycle to fade in and out on a loop. Works great! But what I want to do is have another div (which is a caption talking about the image) floating on top. This 'caption' div would also fade with each image so that the appropriate caption displays with each image.

I could of course, just make the caption part of the image, but I was hoping to retain the ease of editing that the HTML provides.

I have managed to get the slideshow operating on both the image and the caption div's but the problem is that the image keeps appearing on top of the caption, effectively hiding the caption (I can see the caption transitioning underneath when the image is semi-transparent during its fade to the next image).

So, does anyone know how to get the caption to appear on top? (by the way, if I don't have the slideshow running on the caption it successfully stays on top of the images transitioning. Unfortunately the caption doesn't change this way!).

Any help you can offer (even if it's a different pluggin) would be appreciated!

Hope this makes sense and thanks in advance.

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

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

发布评论

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

评论(1

快速谷歌搜索给了我这个:

http://slidesjs.com/examples/images-with-captions /

可能不完全是您正在寻找的东西,但它看起来相当可定制。

Quick google search gave me this:

http://slidesjs.com/examples/images-with-captions/

May not exactly be what you're looking for, but it looks fairly customizable.

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