标签:script button let ges section -- glob new IV
1、添加swiper滚动banner
初始化
<section id="banner"> <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide"> <img src="{dede:global.cfg_templets_skin/}/images/1-1606021QP2936.jpg"> </div> <div class="swiper-slide"> <img src="{dede:global.cfg_templets_skin/}/images/1-16111Q43043L6.jpg"> </div> <div class="swiper-slide"> <img src="{dede:global.cfg_templets_skin/}/images/1-1606021QU90-L.jpg"> </div> </div> <!-- 如果需要分页器 --> <div class="swiper-pagination"></div> </div> </section>
<script> var mySwiper = new Swiper (‘.swiper-container‘, { loop: true, // 如果需要分页器 pagination: { el: ‘.swiper-pagination‘, }, // 如果需要前进后退按钮 navigation: { nextEl: ‘.swiper-button-next‘, prevEl: ‘.swiper-button-prev‘, }, // 如果需要滚动条 scrollbar: { el: ‘.swiper-scrollbar‘, }, }) </script>
标签:script button let ges section -- glob new IV
原文地址:https://www.cnblogs.com/linxingyun/p/9252281.html