这样导致代码轮播图无法横向滑动贴上代码,求指教(网上找的例子)<html><head> <meta charset="UTF-8"> <title>Document</title> <style> .swiper-slide { width: 200px; height: 300px; border: 1px solid #333; } </style></head><body> <!-- Swiper 需要轮播的内容 --> <div class="swiper-container swiper-container-horizontal"> <div class="swiper-wrapper"> <div class="swiper-slide"> <p>我是第一张图片</p> </div> <div class="swiper-slide"> <p>我是第二张图片</p> </div> <div class="swiper-slide"> <p>我是第三张图片</p> </div> </div> </div></body></html><script src="https://cdn.bootcss.com/jquery/1.10.0/jquery.js"></script><script src="https://cdn.bootcss.com/Swiper/3.4.1/js/swiper.jquery.min.js"></script><script> var swiper = new Swiper('.swiper-container', { parallax: true, speed: 600, // 速度 autoplay: 900, //可选选项,自动滑动 });</script>
添加回答
举报
0/150
提交
取消