移动图像滑块

时间:2013-06-23 18:07:38

标签: css jquery-mobile

我想要一个移动网页,在网页中间,我可以向左/向右滑动手指,然后在图像之间滚动。

要展示的照片:

Demonstration 我想用手指在被删除的图像之间滑动。 我该怎么办?

提前致谢!

1 个答案:

答案 0 :(得分:0)

你正在寻找一种类似于封面的东西。这可能会指导您正确的方向:http://andrebrov.net/dev/carousel/

来源链接:http://forum.jquery.com/topic/jquery-mobile-carousel-widget

GITHUB链接:https://github.com/andrebrov/jqm.carousel

以下是HTML的外观:

<div style="height:460px;width:300px;">
    <div id="carousel" class="carousel">
      <div id="carousel_scrollpane" class="carousel-content">
        <div id="carousel_content" class="carousel-content-scroller"></div>
      </div>

      <div id="carousel_nav" class="carousel-nav">
        <div id="carousel_mid" class="carousel-mid"></div>
      </div>
    </div>
  </div>

然后,初始化将采用这种方式:

var carousel = new $.widgets.Carousel({
    uuid: "carousel",
    args: {
        "scrollInterval": 600,
        "itemWidth": 290
    },
    value: [{
        "title": "Tron.Legacy",
        "image": "images/1.jpg"
    }, {
        "title": "Yogi Bear",
        "image": "images/2.jpg"
    }, {
        "title": "The Chronicles of Narnia: The Voyage of the Dawn Treader",
        "image": "images/3.jpg"
    }, {
        "title": "The Fighter",
        "image": "images/4.jpg"
    }, {
        "title": "Tangled",
        "image": "images/5.jpg"
    }]
});

希望这有帮助!