zoukankan      html  css  js  c++  java
  • swiper使用-点击跳转指定页

    1、点击swiper以外元素跳转至指定页

    var index = $(this).index() // var index = 1
    1、$(".swiper-pagination span").eq(index).trigger('click');
    2、swiper.slideTo(index, 10, false);
    

    2、某种条件下触发swipe滚动事件

    if (index=="2") { //节假日、生日并存
      var swiper = new Swiper('.swiper-container2', {
    	loop: true,
    	autoplay: 1500,
      });
    }else{
       //否则不轮播
    }
    

     3、闪屏

    swiper滑动轮播闪屏
    	1、父元素套
    		 transform:translate3d(0,0,0);
    		        overflow:hidden;
    	2、闪动元素/自子元素:
    		transform:translate3d(0,0,0)
    

      

  • 相关阅读:
    列表方块与格式与布局
    框架与样式表的基本概念
    表单
    内容容器,常用标签
    CSS3
    表单验证
    练习题
    document对象
    windows对象
    函数
  • 原文地址:https://www.cnblogs.com/cdj61/p/13540462.html
Copyright © 2011-2022 走看看