背景轮播,用于在幻灯片图像中包含 DIV

Background carousel to include DIVs in slide images

本文关键字:图像 包含 DIV 幻灯片 用于 背景      更新时间:2023-09-26

>我有一个Javascript背景包装器,我想在其图像上添加一些中间的"描述"div。

<script type="text/javascript">
<!--
var slideInterval=20000;
var slideTransition=3500;
var slideArray=["index_files/background1.jpg","index_files/background2.jpg","index_files/background3.jpg"];
jQuery.fx.interval=33;
// -->
</script>

如所见,这个插件只允许我滑动图像而不是 DIV。我想包括下面的描述(3 张图片的 3 个描述)

<div style="opacity: 1 ! important;" class="description">
                    <h2>An everyday...</h2>
                    <p>Sharing rides in underground Paris...<a href="http://www.es-processing.com/mobility.htm" class="more" target="_blank" title="More">More &gt;&gt;</a></p>
                </div>

当我想将 3 个描述 Div 中的每一个与上述插件相关联时,最好的考虑方法是什么"background1...3"以便插件会自动将它们一起显示。感谢您的评论。

这很容易用 AngularJS 和 Bootstrap 做到......http://angular-ui.github.io/bootstrap/向下滚动到轮播示例,然后根据需要对其进行一些修改。不过,此页面上给出的示例应该可以做到这一点。