vue el-image>查看大图修改关闭按钮样式

 

 

<el-image :src="img"  class="img"></el-image>
<style lang="less">
  .img {
    .el-icon-circle-close {
      color: white;
    }
  }
</style>

 

 

 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
以下是一个示例代码,使用了ElementUI,包含文带按钮的卡片、光标悬浮播放视频的video标签、以及一组光标悬浮放大片的片展示: ```html <template> <div class="container"> <!-- 文带按钮的卡片 --> <el-card class="card"> <div class="img-wrapper"> <img src="./assets/image.jpg" alt=""> </div> <div class="text-wrapper"> <h3>这是标题</h3> <p>这是一段描述文字</p> <div class="btn-wrapper"> <el-button type="primary">查看详情</el-button> </div> </div> </el-card> <!-- 光标悬浮播放视频 --> <div class="video-wrapper"> <video src="./assets/video.mp4" controls></video> </div> <!-- 一组光标悬浮放大片的片展示 --> <div class="gallery"> <div class="img-item"> <img src="./assets/image1.jpg" alt=""> </div> <div class="img-item"> <img src="./assets/image2.jpg" alt=""> </div> <div class="img-item"> <img src="./assets/image3.jpg" alt=""> </div> </div> </div> </template> <script> export default { name: "Example", }; </script> <style> .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin: 30px; } .card { width: 300px; margin-bottom: 30px; } .img-wrapper { height: 200px; overflow: hidden; } .img-wrapper img { width: 100%; height: auto; object-fit: cover; } .text-wrapper { padding: 20px; text-align: center; } .btn-wrapper { margin-top: 20px; } .video-wrapper { margin-bottom: 30px; } .gallery { display: flex; flex-wrap: wrap; justify-content: space-between; } .img-item { position: relative; width: 250px; height: 250px; margin-bottom: 30px; } .img-item img { width: 100%; height: 100%; object-fit: cover; } .img-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.2); opacity: 0; transition: opacity 0.3s ease-out; } .img-item:hover::before { opacity: 1; } .img-item:hover img { transform: scale(1.1); } </style> ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值