目录
1.自由模式与滑块容器(Free Mode and Scroll Container)
2.自由模式与滑块容器(Free Mode and Scroll Container)
4.触屏/鼠标事件效应(Touch/mouse interactions )
Swiper参数说明(swiper参数配置)
1.自由模式与滑块容器(Free Mode and Scroll Container)
Parameter(参数) | Type(类型) | Default Value(默认值 | Example(例子) | Description(说明) |
speed | number | 300 | 600 | slides滑块动画之间的持续时间(单位ms) |
eventTarget | string | ‘wrapper’ | ‘container’ | swipers事件对象,默认状态下所有的触控事件只能用于wrapper。如若需要其他元素包含在container内以及使用swipers,那么可以使用’container’. 2.4.2版本新增 |
autoplay | number | 5000 | - | 过渡延迟时间(单位ms),参数没有指定的情况下,不生效,(补充:当用户操作后autoplay失效) |
autoplayDisableOninteraction | boolean | true | false | 当设置为false时,用户操作之后(swipes,arrow以及pagination 点击)autoplay不会被禁掉,用户操作之后每次都会重新启动autoplay。 |
autoplayStopOnLast | boolean | false | true | 设置为false后autoplay在最后一个块下失效(在没有设置loop的情况下) |
mode | string | ‘horizontal’ | ‘vertical’ | slides滑动方式,水平或垂直 |
loop | boolean | false | true | true 为loop模式生效 |
loopAdditionalSlides | number | 0 | 2 | loop模式下slides数量增加个数 |
loopedSlides | number |