瑕佸埗浣渇ade out 鏁堟灉鍙渶瑕佽缃?
animateOut: 'fadeOut'
fadeOut
鍊煎彧鏄唴缃殑CSS鍔ㄧ敾鏍峰紡銆傝繕鏈変竴浜涢澶栫殑CSS animations浣犲彲浠ヤ娇鐢ㄣ€係imply download animate.css library and you are ready to extend Owl with new fancy transitions.
Animate鍑芥暟鍙湪涓€涓」涓伐浣滐紝骞朵笖鍙湪娴忚鍣ㄤ腑鏀寔perspective灞炴€с€?/p>
animateOut
鍜?animateIn
鍙傛暟$('.custom1').owlCarousel({
animateOut: 'slideOutDown',
animateIn: 'flipInX',
items:1,
margin:30,
stagePadding:30,
smartSpeed:450
});
Example with slideOutDown and flipInX
鍦ㄥ紑濮嬪姩鐢诲墠鏈変笁涓猚lass琚坊鍔犲埌姣忎釜椤逛笂锛?/p>
Part of owl.carousel.css:
/* Feel free to change duration */
.animated {
-webkit-animation-duration : 1000 ms ;
animation-duration : 1000 ms ;
-webkit-animation-fill-mode : both ;
animation-fill-mode : both ;
}
/* .owl-animated-out - only for current item */
/* This is very important class. Use z-index if you want move Out item above In item */
.owl-animated-out {
z-index : 1
}
/* .owl-animated-in - only for upcoming item
/* This is very important class. Use z-index if you want move In item above Out item */
.owl-animated-in {
z-index : 0
}
/* .fadeOut is style taken from Animation.css and this is how it looks in owl.carousel.css: */
.fadeOut {
-webkit-animation-name : fadeOut ;
animation-name : fadeOut ;
}
@-webkit-keyframes fadeOut {
0% {
opacity : 1 ;
}
100% {
opacity : 0 ;
}
}
@keyframes fadeOut {
0% {
opacity : 1 ;
}
100% {
opacity : 0 ;
}
}