嵌套的bxSlider
我想有一个垂直轮播滑块,每个垂直滑块内都有一个水平滑块,我正在使用bxSlider,它对垂直滑块部分效果很好,但是当我嵌套水平部分时,水平滑块不起作用如预期的那样.
I would like to have a vertical carousel slider and inside each vertical slide I will have a horizontal slider, I am using bxSlider and it works well for vertical slider part but when I nest the horizontal part the horizontal slider doesn't work as expected.
有什么想法吗?
即使使用bxSlider这样有据可查的滑块,也很难从多个滑块制作一个滑块.幸运的是,我已经做了一些非常接近您想要的东西.我无法使水平子滑块也移动,我认为这可能与父滑块垂直移动这一事实有关.我在父级Slider上使用了bxSlider选项preventDefaultSwipeY
,但这不是很直观,用户需要使用按钮进行导航.
因此,我改为使用iframe隔离了水平滑块.每个水平嵌套滑块都在其自己的页面上,该页面位于主父页面的同一目录中.
这是一个演示,其具有:
Making a slider from multiple sliders is difficult even with a well documented one like bxSlider. Fortunately, I already made something that's pretty close to what your'e looking for. I couldn't get the horizontal child sliders to move as well, I think it might have to do with the fact that the parent slider moves vertically. I used the bxSlider option preventDefaultSwipeY
on the parent Slider, but it wasn't very intuitive, the user would need to use the buttons to navigate.
So instead I isolated the horizontal sliders by using iframes. Each horizontal nested slider is on it's own page which sits in the same directory of the main parent page.
Here's a demo, which has:
- 父页面上的垂直轮播.
- 6个水平滑块,每个滑块在其自己的单独页面上.
- 这6个iframe嵌套在垂直轮播中.
- 有6个水平滑块的手动和自动控件.
- 有一组蓝色箭头可以控制垂直滑块.
由于您没有发布示例,因此我通过猜测可以得出这一结论.我希望这会有所帮助.
Since you don't have an example posted, this is as close as I can get by guessing. I hope this helps.