|
js代码:
<script>
var swiper = new Swiper('.swiper-container1', {
pagination: '.swiper-pagination',
paginationClickable: true,
spaceBetween: 30,
centeredSlides: true,
autoplay: 3000,
simulateTouch:true,
followFinger:true,
grabCursor:true,
});
var swiper2 = new Swiper('.swiper-container2', {
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
slidesPerView:3,
paginationClickable: true,
spaceBetween: 30,
onlyExternal:true
});
</script>
html
<div class="swiper-container1 swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide"><img src="./img/1.jpg"></div>
<div class="swiper-slide"><img src="./img/1.jpg"></div>
<div class="swiper-slide"><img src="./img/1.jpg"></div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination cmy-pagination"></div>
</div>
<div class="menuinner">
<div class="swiper-container2 swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide "><a href="#"><img class="menu2" src="./img/menu1.png"><br><span>院所概况</span></a></div>
<div class="swiper-slide "><a href="#"><img class="menu2" src="./img/menu2.png"><br><span>院所概况</span></a></div>
<div class="swiper-slide "><a href="#"><img class="menu2" src="./img/menu3.png"><br><span>院所概况</span></a></div>
<div class="swiper-slide "><a href="#"><img class="menu2" src="./img/menu4.png"><br><span>院所概况</span></a></div>
</div>
</div>
<div class="swiper-button-next">></div>
<div class="swiper-button-prev"><</div>
</div>
|
|