轮播插件swiper

使用步骤

1.引用js

<script src="swiper/swiper.min.js" type="text/javascript" charset="utf-8"></script>

2.html部分

            <div class="swiper-container">
                        <div class="swiper-wrapper">
                            <div class="swiper-slide"><img src="img/lb_01.jpg" /></div>
                            <div class="swiper-slide"><img src="img/lb_02.jpg" /></div>
                            <div class="swiper-slide"><img src="img/lb_03.jpg" /></div>
                            <div class="swiper-slide"><img src="img/lb_04.jpg" /></div>
                        </div>
                        <!-- Add Arrows -->
                        <div class="swiper-button-next"></div>
                        <div class="swiper-button-prev"></div>
                    </div>

 

tip:修改箭头样式

<!--需在引用的js后修改-->
<style type="text/css">
    .swiper-button-prev{background: url("img/lb_prev.png") no-repeat center center;}
    .swiper-button-next{background: url("img/lb_next.png") no-repeat center center;}
</style>

 

posted @ 2019-04-12 11:22  小白&小菜  阅读(212)  评论(0编辑  收藏  举报
我是一个小菜鸟,飞呀飞呀,快飞高