新年
快乐
swiper手机焦点图幻灯片切换特效

swiper手机焦点图幻灯片切换特效

swiper手机焦点图幻灯片切换特效插图

swiper手机焦点图幻灯片切换特效是一款基于swiper.js的手机移动端图片滑动切换代码,宽屏响应式自适应浏览器宽度。

js代码

<script src="https://img.x22t.com/file/2020/04/25/b6dd95382d895e93095636cba7ee1d748118.js"></script>
<script>
window.onload = function() {
var swiper = new Swiper(".swiper-container",{
	autoplay:3000,
	speed:1000,
	autoplayDisableOnInteraction : false,
	loop:true,
	centeredSlides : true,
	slidesPerView:2,
	pagination : ".swiper-pagination",
	paginationClickable:true,
	prevButton:".swiper-button-prev",
	nextButton:".swiper-button-next",
	onInit:function(swiper){
		swiper.slides[2].className="swiper-slide swiper-slide-active";//第一次打开不要动画
		},
	breakpoints: { 
			668: {
				slidesPerView: 1,
			 }
		}
	});
	}
</script>

分享到 :
相关推荐

Leave a Reply

Your email address will not be published. Required fields are marked *