jssor scrolling logo - 为每张幻灯片指定单独的宽度

时间:2014-09-09 06:25:41

标签: jquery scroll slide jssor

如何为每张幻灯片指定不同的宽度。我的徽标有不同的宽度,从100到350 PX。所以我想为每张幻灯片设置不同的幻灯片宽度。

    <div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 980px; height:100px;overflow:hidden;">
        <div><img width="100" u="image" alt="android" src="../img/logo/android.jpg" /></div>
        <div><img width="200" u="image" alt="bitly" src="../img/logo/bitly.jpg" /></div>
        <div><img width="300" u="image" alt="blogger" src="../img/logo/blogger.jpg" /></div>
    </div>

1 个答案:

答案 0 :(得分:0)

如果您删除了u =&#34; image&#34;,您可以自行自定义内容。

例如,您将$ SlideWidth设置为300.幻灯片0包含2个图像,幻灯片1包含1个图像,幻灯片2包含2个图像。

<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 900px; height:100px;overflow:hidden;">
    <div>
        <img style="position: absolute; top: 0px; left: 0px; width: 100px; height: 100px;" alt="android" src="../img/logo/android.jpg" />
        <img style="position: absolute; top: 0px; left: 100px; width: 200px; height: 100px;" alt="android" src="../img/logo/android.jpg" />
    </div>
    <div>
        <img style="position: absolute; top: 0px; left: 0px; width: 300px; height: 100px;" alt="android" src="../img/logo/android.jpg" />
    </div>
    <div>
        <img style="position: absolute; top: 0px; left: 0px; width: 100px; height: 100px;" alt="android" src="../img/logo/android.jpg" />
        <img style="position: absolute; top: 0px; left: 100px; width: 100px; height: 100px;" alt="android" src="../img/logo/android.jpg" />
        <img style="position: absolute; top: 0px; left: 200px; width: 100px; height: 100px;" alt="android" src="../img/logo/android.jpg" />
    </div>
</div>