swiper輪播

常規app

<div class="swiper-container banner">
        <div class="swiper-wrapper">
            <div class="banner swiper-slide">
                <img src="./img/banner2.jpg" alt="">
                <h1 class="introduceTitle">風采1</h1>
            </div>
            <div class="banner swiper-slide">
                <img src="./img/banner2.jpg" alt="">
                <h1 class="introduceTitle">風采2</h1>
            </div>
            <div class="banner swiper-slide">
                <img src="./img/banner2.jpg" alt="">
                <h1 class="introduceTitle">風采3</h1>
            </div>
        </div>
        <div class="swiper-pagination"></div>
    </div>

jside

var swiper = new Swiper('.swiper-container', {
        spaceBetween: 30,
        autoplay: {
            delay: 2500,
            disableOnInteraction: false,
        },
        pagination : {
            el: '.swiper-pagination',
        },
    });
相關文章
相關標籤/搜索