Vue Carousel 3d - Arrow controls enabled with images and captions
by denvut
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.7/vue.js"></script>
<script src="https://rawgit.com/Wlada/vue-carousel-3d/master/dist/vue-carousel-3d.min.js"></script>
<div id="example">
<carousel-3d :controls-visible="true" :clickable="false">
<slide v-for="(slide, i) in slides" :index="i">
<figure>
<img src="https://placehold.it/360x270">
<figcaption>
The sky is the limit only for those who aren't afraid to fly!
The sky is the limit only for those who aren't afraid to fly!
</figcaption>
</figure>
</slide>
</carousel-3d>
</div>
<div id="example1">
<carousel-3d :controls-visible="true" :clickable="false">
<slide v-for="(slide, i) in slides" :index="i">
<figure>
<img src="https://placehold.it/360x270">
<figcaption>
The sky is the limit only for those who aren't afraid to fly!
The sky is the limit only for those who aren't afraid to fly!
</figcaption>
</figure>
</slide>
</carousel-3d>
</div>
CSS
.carousel-3d-container figure {
margin:0;
}
.carousel-3d-container figcaption {
position: absolute;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
bottom: 0;
position: absolute;
bottom: 0;
padding: 15px;
font-size: 12px;
min-width: 100%;
box-sizing: border-box;
}
JavaScript
new Vue({
el: '#example',
data: {
slides: 7
},
components: {
'carousel-3d': Carousel3d.Carousel3d,
'slide': Carousel3d.Slide
}
})
new Vue({
el: '#example1',
data: {
slides: 7
},
components: {
'carousel-3d': Carousel3d.Carousel3d,
'slide': Carousel3d.Slide
}
})