1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <div class="carousel">
- <swiper :options="swiperOption">
- <swiper-slide></swiper-slide>
- <!-- <swiper-slide></swiper-slide>-->
- <!-- <swiper-slide></swiper-slide>-->
- <!-- <swiper-slide></swiper-slide>-->
- <div class="swiper-pagination" slot="pagination"></div>
- </swiper>
- </div>
- </template>
- <script>
- export default {
- name: 'carousel',
- data() {
- return {
- swiperOption: {
- pagination: {
- el: '.swiper-pagination',
- clickable : true,
- bulletClass: 'my-bullet',
- bulletActiveClass: 'my-bullet-active'
- },
- effect:'fade',
- autoplay: {
- delay: 10000,
- disableOnInteraction: true
- },
- }
- }
- }
- }
- </script>
- <style lang="less" scoped>
- .carousel {
- width: 100%;
- height: 100%;
- position: relative;
- .swiper-container {
- height: 100%;
- .swiper-slide {
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- background-attachment: scroll;
- height: 100%;
- text-align: center;
- font-size: 18px;
- //&:nth-of-type(1) {
- // background: url('https://file.funcheergame.com/office/image/index/carousel_04.png') center top / cover no-repeat;
- //}
- //&:nth-of-type(2) {
- // background: url('https://file.funcheergame.com/office/image/index/carousel_03.png') center top / cover no-repeat;
- //}
- &:nth-of-type(1) {
- background: url('https://file.funcheergame.com/office/image/index/carousel_01.png') center top / cover no-repeat;
- }
- //&:nth-of-type(4) {
- // background: url('https://file.funcheergame.com/office/image/index/carousel_02.png') center top / cover no-repeat;
- //}
- }
- }
- }
- </style>
|