我正在使用CarouFredSel jQuery插件(http://caroufredsel.dev7studios.com)在我的网站上创建动画旋转木马。然而,我注意到动画是不正确的-它动画等待太远(与我编码的设置相比),然后在动画结束时,它跳到正确的位置。
这里是错误发生的页面:http://mnogal.pl/kopernik/html/strona_glowna.html -文本应该总是在中间,动画应该只是移动到中间的下一个文本。
它的设置像PIC1- TEXT -PIC2- TEXT -PIC1等等,所以它应该在每个动画之后交替两个图片的位置,如果这有意义的话。
我最终在动画之后显示了正确的东西,它只是动画方式太远了,并且在它结束之前跳跃。
我检查了一下旁边的demo,没有发生这样的事情,我的代码看起来也是正确的,没有异常:
$("#carousel .overview").carouFredSel({
height: 507,
items: {
visible: 3,
},
scroll: {
items: 2,
duration: 3000
},
auto: 6000
});有人能帮上忙吗?我搞不懂这件事。
发布于 2012-10-29 23:17:07
服务器上没有scripts.js (http://mnogal.pl/kopernik/html/js/scripts.js)。这样产生的错误会阻止其他javascript运行。先把它修好!
发布于 2012-11-03 01:01:00
我可以推荐Twitter Bootstrap吗?
底部的示例:http://twitter.github.com/bootstrap
轮播示例:http://twitter.github.com/bootstrap/examples/carousel.html
转盘代码:http://twitter.github.com/bootstrap/javascript.html#carousel
发布于 2012-11-03 07:02:28
你可能想试试这个:http://jsfiddle.net/mW5Y9/2/。@MichaelCalkins意味着什么的现场演示。
<div id="myCarousel" class="carousel slide" data-interval="your_interval_in_secs">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">…</div>
<div class="item">…</div>
<div class="item">…</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>https://stackoverflow.com/questions/13041396
复制相似问题