forked from opentiny/tiny-vue
43 lines
918 B
Vue
43 lines
918 B
Vue
<template>
|
|
<div>
|
|
<tiny-carousel type="card" height="150px">
|
|
<tiny-carousel-item class="carousel-item-demo" v-for="item in 4" :key="item">
|
|
<h3>{{ item }}</h3>
|
|
</tiny-carousel-item>
|
|
</tiny-carousel>
|
|
<br />
|
|
<tiny-carousel type="card" height="200px">
|
|
<tiny-carousel-item class="carousel-item-demo" v-for="item in 4" :key="item">
|
|
<h3>{{ item }}</h3>
|
|
</tiny-carousel-item>
|
|
</tiny-carousel>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { Carousel as TinyCarousel, CarouselItem as TinyCarouselItem } from '@opentiny/vue'
|
|
</script>
|
|
|
|
<style scoped>
|
|
.tiny-carousel__item h3 {
|
|
color: #475669;
|
|
opacity: 0.75;
|
|
line-height: 150px;
|
|
margin: 0;
|
|
text-align: center;
|
|
font-size: 25px;
|
|
}
|
|
|
|
.block {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.carousel-item-demo:nth-child(2n) {
|
|
background-color: #fafafa;
|
|
}
|
|
|
|
.carousel-item-demo:nth-child(2n + 1) {
|
|
background-color: #edf0f3;
|
|
}
|
|
</style>
|