Carousel轮播

移植于 https://bulma-carousel.onrender.com/


Carousel组件的子元素直接是轮播项即可

多项显示


Options参数说明

Name Description Default value
Name Description Default value
InitialSlide Initial item index 0
SlidesToScroll Slide to scroll on each step 1
SlidesToShow Slides to show at a time 1
Navigation Display navigation buttons true
NavigationKeys Enable navigation with arrow keys true
NavigationSwipe Enable swipe navigation true
Pagination Display pagination bullets true
Loop Activate loop display mode false
Infinite Activate infinite display mode false
Effect Animation effect for item transition (translate|fade) translate
Duration Transition animation duration (in ms) 300
Timing Transiation animation type ease
Autoplay Autoplay carousel false
AutoplaySpeed Time between each transition when autoplay is active (ms) 3000
PauseOnHover Stop autoplay when cursor hover carousel true

方法

Carousel component provides some public methods to manually work with it.

next()
Slide to next item
Parameters
none
Return values
none
previous()
Slide to previous item
Parameters
none
Return values
none
start()
Start autoplay
Parameters
none
Return values
none
stop()
Stop autoplay
Parameters
none
Return values
none
show(index, force)
Show item at "index" a
Parameters
index Integer|null Index of item to show
force Boolean Animate transition if true (default) or not if false
Return values
none
reset()
Reset Carousel to initial values
Parameters
none
Return values
none

文档