楼主强大,
这个轮播图片的顺序可以指定吗?
使用简单。引入jq和插件js文件。使用如下:
<div class='container'> <div id='banner'></div> </div> <script src='./js/jquery.js'></script> <script src='./js/carousel.js'></script> <script> window.onload = function() { var banner = new Carousel(); //图片地址数组。不要少于三张 var imgSrcDate = ["./public/img/01.jpg", "./public/img/02.jpg", "./public/img/03.jpg", "./public/img/04.jpg", "./public/img/05.png", "./public/img/06.jpg"]; banner.init({ container: "#banner", datas: imgSrcDate, autoplaySpeed: 5000, autoplay: false }); } </script>