jQuery orbit 幻灯片
程序员文章站
2022-03-28 17:02:29
...
在线实例
默认 | 带缩略图 | 带描述 |
使用方法
- <div class="wrap" style="width: 565px; height: 290px; margin: 0 auto;">
- <div id="featured">
- <a class="orbit-item" href="#" data-caption="#htmlCaption1"><img src="images/img1.jpg" alt="img1"></a>
- <img src="images/img4.jpg" alt="img4" data-caption="#htmlCaption5">
- <a href="#"><img src="images/img2.jpg" alt="img2"></a>
- <div class="orbit-item" style="background-color: #eee; text-align: center; line-height: 290px;">这是一个空的div,可以放 html代码、视频等等</div>
- <a href="#" data-caption="#htmlCaption3"><img src="images/img3.jpg" alt="img3"></a>
- </div>
- <span class="orbit-caption" id="htmlCaption1">这是幻灯片<strong>1</strong>的标题</span>
- <span class="orbit-caption" id="htmlCaption3">这是蝙蝠侠吗?</span>
- <span class="orbit-caption" id="htmlCaption5">没有链接的幻灯片</span>
- </div>
- <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.7.2/jquery.min.js"></script>
- <script src="js/jquery.orbit.min.js"></script>
- <script>
- $(window).load(function() {
- $('#featured').orbit({
- 'bullets' : true,
- 'captionAnimation' : 'slideOpen'
- });
- });
- </script>
复制