2017-05-17 8 views

답변

3

1) swiper.js에서 s.effects 개체 (효과 부분)로 이동하여 다음과 같이 자신의 효과 속성을 추가 :

myEffect: { 
    setTranslate: function() { 

    // your actual animation code goes here 
    }, 

    setTransition: function(duration) { 

      // duration is between 0 and max speed (300 is default) 
      // but you can change it in the config object below 

      // is called when your swiping starts and ends 
    } 
} 

2)이을 새로운 효과를 사용하려면 자세한 내용

var mySwiper = new Swiper('.swiper-container', { 

      // other options … 

      // and add this 
      effect: “myEffect” 
     } 

); 

여기 봐 : https://github.com/nolimits4web/Swiper/issues/1497