将旋转木马箭头放在Vue真棒滑块中的外面

时间:2018-07-07 13:13:32

标签: css vue.js carousel

我正在使用Vue-awesome-slider作为轮播库,并希望将滑动箭头放置在轮播主体外部。但是由于轮播容器已隐藏,所以我无法将其放置在轮播之外。

https://github.com/surmon-china/vue-awesome-swiper

2 个答案:

答案 0 :(得分:0)

只需将按钮元素移到雨刷容器之外即可。

<div>
  <swiper :options="swiperOption">
    <swiper-slide>I'm Slide 1</swiper-slide>
    <swiper-slide>I'm Slide 2</swiper-slide>
    <swiper-slide>I'm Slide 3</swiper-slide>
    <swiper-slide>I'm Slide 4</swiper-slide>
  </swiper>
  <div class="swiper-button-prev" slot="button-prev"></div>
  <div class="swiper-button-next" slot="button-next"></div>
</div>

答案 1 :(得分:0)

只需添加到swiperOptions navigation: { nextEl: '.swiper-button-prev', prevEl: '.swiper-button-next', }