jQuery Roundabout:更改显示的项目数量

发布于 2024-12-28 07:14:44 字数 2955 浏览 0 评论 0原文

我正在使用 jQuery Roundabout 插件。我想知道是否有办法选择显示的图片数量。我有十张图片,但只有其中三张应该可见,如“方形”示例中的第二个(扩展)链接所示。

这怎么可能?

编辑更多信息:

jquery roundabout-plugin: http://frdhq.com/projects/roundabout

和扩展: http://frdhq.com/projects/roundabout-shapes/

->我想要“方形”

相关代码:

<head>
<style>
.roundabout-holder {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
  height: 500px;
  width: 300px;
}

.roundabout-moveable-item {
  cursor: pointer;
  border: 1px solid #999;
  bottom: 0;
}

.roundabout-in-focus {
  cursor: auto;
}
</style>

<script type="text/javascript" src="../../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../js/jquery.roundabout.js"></script> 
<script type="text/javascript" src="../../js/jquery.roundabout-shapes.js"></script> 

<script>
   $(document).ready(function() {
      $('ul.roundabout-holder').roundabout({
         shape: 'square',
         btnNext: ".next",
         btnPrev: ".prev",
         btnStopAutoplay: ".stop",       
         btnStartAutoplay: ".start",                 
         duration: 1000,
         autoplay: true,
         autoplayDuration: 4000,         
         autoplayPauseOnHover: true,
         reflect: false,
         minOpacity: 0.5,
         minScale: 0.1
      });
   });
</script>  



</head>

<body>

<ul class="roundabout-holder">
    <li class="roundabout-moveable-item"><a href="img/hauptbild-gross.jpg"><img src="img/hauptbild.jpg" width="466" height="500" /></a></li>                
    <li class="roundabout-moveable-item"><a href="img/baerenfamilie-gross.jpg"><img src="img/baerenfamilie.jpg" width="400" height="196" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hamster-bleistift-gross.jpg"><img src="img/hamster-bleistift.jpg" width="400" height="351" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hamster-schlafend-gross.jpg"><img src="img/hamster-schlafend.jpg" width="400" height="302" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hamster-schmetterling-gross.jpg"><img src="img/hamster-schmetterling.jpg" width="400" height="374" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hase-gross.jpg"><img src="img/hase.jpg" width="384" height="500" /></a></li>
</ul>



</body>

</html> 

这是项目网址: http://www.eyes-on-fire.de /test/2/portfolio/tiere/index.php

(作为新手,我不被允许发布三个链接)

I am using the jQuery Roundabout plugin. I am wondering if there is a way to choose the number of pictures that are shown. I have ten pictures, but only three of them should be visible as shown in the second (extention) link within the "square" example.

How is that possible?

Edit with further information:

jquery roundabout-plugin: http://fredhq.com/projects/roundabout

and extension: http://fredhq.com/projects/roundabout-shapes/

-> I would like to have the "square shape"

relevant code:

<head>
<style>
.roundabout-holder {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
  height: 500px;
  width: 300px;
}

.roundabout-moveable-item {
  cursor: pointer;
  border: 1px solid #999;
  bottom: 0;
}

.roundabout-in-focus {
  cursor: auto;
}
</style>

<script type="text/javascript" src="../../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../js/jquery.roundabout.js"></script> 
<script type="text/javascript" src="../../js/jquery.roundabout-shapes.js"></script> 

<script>
   $(document).ready(function() {
      $('ul.roundabout-holder').roundabout({
         shape: 'square',
         btnNext: ".next",
         btnPrev: ".prev",
         btnStopAutoplay: ".stop",       
         btnStartAutoplay: ".start",                 
         duration: 1000,
         autoplay: true,
         autoplayDuration: 4000,         
         autoplayPauseOnHover: true,
         reflect: false,
         minOpacity: 0.5,
         minScale: 0.1
      });
   });
</script>  



</head>

<body>

<ul class="roundabout-holder">
    <li class="roundabout-moveable-item"><a href="img/hauptbild-gross.jpg"><img src="img/hauptbild.jpg" width="466" height="500" /></a></li>                
    <li class="roundabout-moveable-item"><a href="img/baerenfamilie-gross.jpg"><img src="img/baerenfamilie.jpg" width="400" height="196" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hamster-bleistift-gross.jpg"><img src="img/hamster-bleistift.jpg" width="400" height="351" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hamster-schlafend-gross.jpg"><img src="img/hamster-schlafend.jpg" width="400" height="302" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hamster-schmetterling-gross.jpg"><img src="img/hamster-schmetterling.jpg" width="400" height="374" /></a></li>
    <li class="roundabout-moveable-item"><a href="img/hase-gross.jpg"><img src="img/hase.jpg" width="384" height="500" /></a></li>
</ul>



</body>

</html> 

And here is the project-url:
http://www.eyes-on-fire.de/test/2/portfolio/tiere/index.php

(I wasn't allowed to post three links as a newbie)

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

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

发布评论

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

评论(1

り繁华旳梦境 2025-01-04 07:14:44

无需过多讨论细节:

maxScale: 1,
minScale: 0.7

应该可以解决问题。

这个想法是根据您的容器宽度/高度(如果适用)调整 minScalemaxScale ,以便您准确地看到您想要查看的图像/幻灯片的数量。

Without going too much into detail:

maxScale: 1,
minScale: 0.7

should do the trick.

The idea is to adjust the minScale and maxScale according to your container width / height as applicable so that you see exactly the number of images / slides that you want to see.

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