赞
踩
基于elementui的走马灯组件改的轮播图,便于展示当前播放的图片
- <template>
- <div class="center home-events-box">
- <el-row type="flex" style="height: 56px;line-height: 56px;margin-bottom:37px" justify="space-between" :gutter="10">
- <el-col style="font-size: 24px;" :span="12">赛事活动</el-col>
- <el-col class="text-right" :span="12">
- <el-button size="mini">查看更多</el-button>
- </el-col>
- </el-row>
- <el-carousel class="carousel-chart-box" :interval="4000" type="card" arrow="never" indicator-position="none" :autoplay="false" height="305px">
- <el-carousel-item v-for="(item,key) in images" :key="key">
- <img :src="item.img" alt="">
- </el-carousel-item>
- </el-carousel>
- </div>
- </template>
- <script>
- export default {
- name: "homeEvents",
- data() {
- return {
- images: [
- {
- img: require("@/assets/images/ilabx-project/1.png"),
- },
- {
- img: require("@/assets/images/ilabx-project/2.png"),
- },
- {
- img: require("@/assets/images/ilabx-project/3.png"),
- },
- ],
- };
- },
- };
- </script>
- <style lang="less" scoped>
- .home-events-box {
- height: 460px;
- background: #fff;
- border-radius: 0px 0px 0px 0px;
- opacity: 1;
- .el-carousel__item--card.is-active {
- width: 95% !important;
- transform: translateX(30px) scale(1) !important;
- }
- }
- </style>
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。