css 列表划过缩放动画

javascript 复制代码
<template>
  <div>
    <div class="item" v-for="(item,index) in list" :key="index">
      <img src="../../../../aa.png" alt="">
      <div class="num">{{(index+1) < 10 ? '0'+(index+1) : index+1 }}</div>
      <div class="title">{{item}}</div>
      <div class="go"></div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      list: [
        '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
        '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
        '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
        '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
        '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头'
      ]
    }
  }
}
</script>

<style lang="less" scoped>
.item {
  display: flex;
  align-items: center;
  background: #ffffff;
  box-shadow: 0px 2px 4px 0px rgba(0, 70, 139, 0.04);
  border-radius: 4px;
  transition: all 0.5s;
  padding: 20px;
  box-sizing: border-box;
  margin-top: 20px;
  position: relative;
  img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
  }
  .num {
    margin: 0 20px;
  }
  .go {
    position: absolute;
    right: 20px;
    top: 50%;
    background: url('../../static/images/icon1.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    width: 36px;
    height: 36px;
    transform: translate(0, -50%);
  }
  cursor: pointer;
  &:hover {
    transform: scale(1.02);
    box-shadow: 0px 2px 8px 4px rgba(0, 70, 139, 0.04);
    color: #004ca1;
    .go {
      background: url('../../static/images/icon1-hover.png');
      background-repeat: no-repeat;
      background-position: center center;
      background-size: 100% 100%;
      width: 36px;
      height: 36px;
      position: absolute;
      top: 50%;
      right: 20px;
      transform: translate(0, -50%);
    }
  }
}
</style>
相关推荐
葡萄城技术团队1 小时前
1000 人协同压测的环境瓶颈排查:CPU 争用与 Wi\-Fi
前端
excel3 小时前
Marked 与 Markdown 有什么区别?该怎么选?
前端
Da Da 泓3 小时前
五子棋 Web 端测试用例报告
前端·网络·websocket·网络协议·测试用例·项目
zxcvb1534 小时前
远程查看本地文档:一条轻量 Web 文件服务的工程化链路
前端·远程查看文档
niucloud-admin4 小时前
NIUCLOUD PHP SAAS上门家政使用文档:城市管理
java·前端·php
北岛贰5 小时前
啵啵音乐迎来全新升级!
前端
hkNaruto7 小时前
【AI】基于大模型的AI游戏地图生成、控制方案:AI Native Game Harness 迁移操作手册
前端·人工智能·游戏
IT_陈寒7 小时前
Java序列化踩坑记:对象循环引用让我加班两小时
前端·人工智能·后端
Acro7 小时前
快给macOS 上的Grok Bot换一套皮肤
前端
flash俊杰7 小时前
双引擎 OCR 编排:逐页判定、视觉优先、partial 语义与三层超时
前端