• swiper4 一个页面多个轮播


    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
        </div>
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
    </div>
    
    <!--    -->
    
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
        </div>
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
    </div>
    
    <!--    -->
    
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
            <div class="swiper-slide"> <img src='<c:url value="/img/downimg/2&${tpbh }"/>' /></div>
        </div>
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
    </div>
    
    。。。。
    <script type="text/javascript">
    
        $(function() {// 初始化内容
            new Swiper(".swiper-container", {
                loop : true,//--可以让图片循环轮播
                slidesPerView : 5,
                slidesPerGroup : 5,
                loopFillGroupWithBlank : true,
                autoplayDisableOnInteraction : false,//--在点击之后可以继续实现轮播
                //pagination : ".swiper-pagination",//--让小圆点显示
                paginationClickable : true,//--实现小圆点点击
                navigation : {
                    nextEl : '.swiper-button-next',
                    prevEl : '.swiper-button-prev',
                },
                observer : true,//修改swiper自己或子元素时,自动初始化swiper
                observeParents : true,//修改swiper的父元素时,自动初始化swiper
            //effect:"flip"//--可以实现3D效果的轮播
            })
    
        });
    </script>
  • 相关阅读:
    DOM操作创建表格
    基于insertBefore函数编写insertAfter函数
    兼容浏览器将NodeList对象转换为数组
    创建对象
    对象属性
    常用命令
    play framework
    Intellij Idea 15 注册方法
    eclipse 背景色调整,设置成护眼色(豆沙绿)
    查看Eclipse版本号,及各个版本区别
  • 原文地址:https://www.cnblogs.com/zzt-lovelinlin/p/9077627.html
Copyright © 2020-2023  润新知