내비게이션 swiper 전환

3320 단어



    
    
    
    <link rel="stylesheet" type="text/css" href="swiper.min.css"/><!--  swiper.css-->
    <style type="text/css">
        .swiper-container{/*       */
            width:400px;
            height:400px;
            border:1px solid #aaa;
        }
        .swiper-slide{/*     */
            width:100%;
            height:100%;
            text-align: center;
            line-height: 400px;
        }
        .swiper-pagination{/*        ,       ,  top             ,          */
            border-bottom: 1px solid #aaa;
            width:100%;
            height:40px;
            display: flex;
            top:0;
        }
        .swiper-pagination-bullet-active{/*                */
            color:#808080;
        }
        .swiper-pagination-bullet{/*         */
            background:transparent;/*           */
            -webkit-flex-grow: 1;/*         ,          */
            text-align: center;
            line-height: 40px;
            border-radius: 0;/*           */
            height: 40px;
            color:#000000;
        }
        .swiper-pagination-bullet:nth-child(1):before{/*             ;*/
            content:"Slide 1";/*      */
        }
        .swiper-pagination-bullet:nth-child(2):before{
            content:"Slide 2";
        }
        .swiper-pagination-bullet:nth-child(3):before{
            content:"Slide 3";
        }
        .swiper-pagination-bullet:nth-child(4):before{
            content:"Slide 4";
        }
        .swiper-pagination-bullet:nth-child(5):before{
            content:"Slide 5";
        }
    </style>


    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">Slide 1</div>
            <div class="swiper-slide">Slide 2</div>
            <div class="swiper-slide">Slide 3</div>
            <div class="swiper-slide">Slide 4</div>
            <div class="swiper-slide">Slide 5</div>
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"/>
    </div>


<script src="swiper.min.js" type="text/javascript" charset="utf-8"/><!--  swiper.js-->
<script type="text/javascript">
window.onload = function(){
        alert("        ")
    var swiper = new Swiper(".swiper-container", {
        pagination: ".swiper-pagination",//     

        loop:true,                         //      ,     false
        paginationClickable: true,         //    ,                 slide
        speed:300,                         //slides           
        autoplayDisableOninteraction:true,//autoplay     ,              autoplay
//            mode:'horizontal',                 //slides    ,     
    });
   }
  </script></code></pre> 
</article>
                            </div>
                        </div>

좋은 웹페이지 즐겨찾기