当前位置:   article > 正文

基于elementui的轮播图_elementui轮播图组件

elementui轮播图组件

基于elementui的走马灯组件改的轮播图,便于展示当前播放的图片

  1. <template>
  2. <div class="center home-events-box">
  3. <el-row type="flex" style="height: 56px;line-height: 56px;margin-bottom:37px" justify="space-between" :gutter="10">
  4. <el-col style="font-size: 24px;" :span="12">赛事活动</el-col>
  5. <el-col class="text-right" :span="12">
  6. <el-button size="mini">查看更多</el-button>
  7. </el-col>
  8. </el-row>
  9. <el-carousel class="carousel-chart-box" :interval="4000" type="card" arrow="never" indicator-position="none" :autoplay="false" height="305px">
  10. <el-carousel-item v-for="(item,key) in images" :key="key">
  11. <img :src="item.img" alt="">
  12. </el-carousel-item>
  13. </el-carousel>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: "homeEvents",
  19. data() {
  20. return {
  21. images: [
  22. {
  23. img: require("@/assets/images/ilabx-project/1.png"),
  24. },
  25. {
  26. img: require("@/assets/images/ilabx-project/2.png"),
  27. },
  28. {
  29. img: require("@/assets/images/ilabx-project/3.png"),
  30. },
  31. ],
  32. };
  33. },
  34. };
  35. </script>
  36. <style lang="less" scoped>
  37. .home-events-box {
  38. height: 460px;
  39. background: #fff;
  40. border-radius: 0px 0px 0px 0px;
  41. opacity: 1;
  42. .el-carousel__item--card.is-active {
  43. width: 95% !important;
  44. transform: translateX(30px) scale(1) !important;
  45. }
  46. }
  47. </style>
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/251007
推荐阅读
相关标签
  

闽ICP备14008679号