SwiperSnscChannel.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div class="swiper">
  3. <el-carousel :interval="3333" height="405px" indicator-class="custom-indicator">
  4. <el-carousel-item v-for="(item, item_index) in 4" :key="item">
  5. <img class="" src="../../public/img/12.png" title="" alt="">
  6. <span class="swiper_dot1 dot1">{{ item_index
  7. }}高邮市周山镇开展渔业安全生产应急高邮市周山镇开展渔业安全生产应急高邮市周山镇开展渔业安全生产应急高邮市周山镇开展渔业安全生产应急</span>
  8. </el-carousel-item>
  9. </el-carousel>
  10. </div>
  11. </template>
  12. <script setup>
  13. import { ElCarousel, ElCarouselItem } from 'element-plus'
  14. </script>
  15. <style lang="less" scoped>
  16. .dot1 {
  17. display: block;
  18. word-break: keep-all;
  19. white-space: nowrap;
  20. overflow: hidden;
  21. text-overflow: ellipsis;
  22. }
  23. .swiper {
  24. width: 100%;
  25. height: 405px;
  26. position: relative;
  27. img {
  28. width: 100%;
  29. height: 405px;
  30. }
  31. .swiper_dot1 {
  32. display: block;
  33. width: 100%;
  34. line-height: 60px;
  35. height: 60px;
  36. color: #fff;
  37. font-size: 24px;
  38. text-indent: 20px;
  39. position: absolute;
  40. bottom: 0;
  41. left: 0;
  42. z-index: 10;
  43. box-sizing: border-box;
  44. padding-right: 244px;
  45. background:linear-gradient(0deg,rgba(0,0,0,0.5) 33%,rgba(0,0,0,0) 100%);
  46. }
  47. }
  48. .el-carousel {
  49. /deep/.el-carousel__arrow i {
  50. font-size: 30px !important;
  51. }
  52. /deep/.el-carousel__arrow--left {
  53. left: 16px;
  54. width: 35px;
  55. height: 57px;
  56. color: #616358;
  57. background: #dcdedc;
  58. position: absolute;
  59. left: 0px;
  60. border: none;
  61. border-radius: 0;
  62. }
  63. /deep/.el-carousel__arrow--right {
  64. right: 16px;
  65. width: 35px;
  66. height: 57px;
  67. color: #616358;
  68. background: #dcdedc;
  69. position: absolute;
  70. right: 0;
  71. border: none;
  72. border-radius: 0;
  73. }
  74. /deep/ .el-carousel__indicators {
  75. // 指示器
  76. left: unset;
  77. transform: unset;
  78. right: 10px;
  79. bottom: 11px;
  80. }
  81. /deep/ .el-carousel__button {
  82. // 指示器按钮
  83. width: 10px;
  84. height: 10px;
  85. border: none;
  86. border-radius: 5px;
  87. background: #fff;
  88. opacity: 1;
  89. }
  90. /deep/ .is-active .el-carousel__button {
  91. // 指示器激活按钮
  92. background: #255590;
  93. width: 25px;
  94. opacity: 1;
  95. }
  96. /deep/ .el-carousel__container {
  97. height: 100%;
  98. }
  99. }
  100. .custom-indicator button {
  101. background-color: #fff;
  102. opacity: 1;
  103. width: 8px;
  104. height: 8px;
  105. }
  106. .custom-indicator button.is-active {
  107. background-color: #DD7D18;
  108. width: 58px;
  109. opacity: 1;
  110. }
  111. </style>