Can you use swiper to achieve multiple switching effects?

now there is a need to do a picture display, and the effect is to randomly change the effect when switching pictures. Can you switch multiple effects with swiper?

May.11,2022

I think so, because when you use swiper, you initialize its configuration in JS, which has an effect setting. Then you set the effect value to a variable and change the variable value each time you click.


set the switching effect of effect
slide. Default is "slide", which can be set to "slide'" (normal switch, default), "fade" (fade), "cube" (square), "coverflow" (3D stream), "flip" (3D flip).
put these effects in an array and then randomly choose one

Menu