我正在尝试使用jCarouselLite作为内容滑块,它在没有Bootstrap的情况下运行良好
我认为jQuery一定与Bootstrap发生了冲突。
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jcarousellite_1.0.1.min.js"></script>
<div class="jCarouselLite">
<ul>
<li>
<img src="img/aboutus_slider (1).png" alt="" width="195" height="350">
</li>
<li>
<img src="img/aboutus_slider (2).png" alt="" width="195" height="350">
</li>
</ul>
</div>
<script type="text/javascript">
$(".jCarouselLite").jCarouselLite({
auto: 800,
speed: 2500,
visible: 6
});
</script>
尝试在jquery和/或jquery.ui 之后添加引导程序
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>
我也有同样的问题,图像似乎没有完全加载。经过一些测试,我正在使用Bootstrap 3,它现在运行良好。尝试将jCarouselLite移到jQuery:附近
<script src="https://code.jquery.com/jquery.js"></script>
<script src="js/jcarousellite.min.js"></script>
<script>
$(window).load(function() {
/* exclusive slide */
$(".exclusives").jCarouselLite({
btnNext: ".ex-next",
btnPrev: ".ex-prev"
});
});
</script>
<script src="js/bootstrap.min.js"></script>
并且在样式表中提供图像的宽度和高度:
.exclusives ul li img {
margin-right: 10px;
width: 140px;
height: 180px;
}
希望这能帮助