我正在尝试使用 Tiny Carousel jQuery 插件水平滑动一些 div。
这是我的html:
<div id="slider">
<div class="viewport">
<div class="overview">
<div class="cols">
<p>Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>ether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>r you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>ct knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>strategies, we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>we make your message resonate, with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
<div class="cols">
<p>with materials that support your sales effort from the inside out.Whether you need to deliver product knowledge, promote a new service, or convey sales strategies, we make your message resonate, with materials that support your sales effort from the inside out.</p>
</div>
</div>
</div>
<div style="clear:both;"></div>
<div class="nav-btn">
<a class="buttons prev" href="#">left</a>
<a class="buttons next" href="#">right</a>
</div>
</div>
这是我的 jQuery
<script type="text/javascript">
//Initialize
$(document).ready(function(){
$('#slider').tinycarousel({
display: 3,
pager: true,
interval: true,
intervaltime: 10000,
//axis: 'y'
controls: true
//animation: false
});
});
该脚本正在运行,但是当我插入 6 cols div 时,滑动不起作用。这是为什么?我已经给 cols div 提供了固定宽度和高度。有时 cols div 中的内容会溢出。在这种情况下,我可以在 cols div 中添加滚动条吗?