鼠标移入展示字体操作

鼠标移入展示字体

点击删除实行删除操作,点击图片文字跳转产品详情的逻辑实现

复制代码
        <div class="allProduct-content">
          <template v-for="(item, index) in obj.product" :key="index">
            <!-- <img :src="item.image" /> -->
            <div class="item" @click="cancelCollect">
              <div class="image" style="background-color: #eee">图片</div>
              <span @click="deleteTracet(item)">取消收藏</span>
              <div class="productName">{{ item.productName }}</div>
              <div class="company">{{ item.company }}</div>
            </div>
          </template>
        </div>
            .allProduct-content {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      margin-top: 24px;

      .item {
        position: relative;
        height: 327px;
        width: calc(20% - 13px);
        margin-right: 16px;
        border: 1px solid rgba(232, 232, 232, 1);
        box-sizing: border-box;
        padding: 14px;
        margin-bottom: 14px;
        &:nth-child(5n) {
          margin-right: 0px !important;
        }
      }
      .item a,
      .item span {
        display: none;
        text-decoration: none;
      }
      .item:hover {
        cursor: pointer;
      }
      .item:hover a.now {
        cursor: pointer;
        position: absolute;
        top: 0px;
        width: 100%;
        height: 100%;
        z-index: 100;
        left: 0;
        display: block;
      }
      .item:hover span {
        display: block;
        position: absolute;
        top: 0px;
        left: 0;
        color: rgba(255, 255, 255, 1);
        width: 100%;
        z-index: 10;
        height: 40px;
        line-height: 40px;
        background: rgba(212, 48, 48, 0.8);
        filter: alpha(opacity=60);
        // -moz-opacity: 0.5;
        // opacity: 0.5;
        font-size: 14px;
        text-align: center;
      }
      .image {
        width: 100%;
        height: 200px;
      }
      .productName {
        font-size: 14px;
        font-weight: 700;
        line-height: 20.27px;
        color: rgba(26, 26, 26, 1);
        padding: 16px 0;
        border-bottom: 1px solid rgba(232, 232, 232, 1);
      }
      .company {
        font-size: 12px;
        font-weight: 400;
        line-height: 17.38px;
        color: rgba(102, 102, 102, 1);
        padding-top: 8px;
      }
    }
相关推荐
We་ct1 分钟前
React 中的双缓存 Fiber 树机制
前端·react.js·缓存·前端框架·reactjs·fiber·缓存机制
We་ct8 分钟前
React Render 与 Commit 阶段详解
前端·react.js·面试·前端框架·react·commit·render
英俊潇洒美少年9 分钟前
React Hook 钩子 useInsertionEffect、useLayoutEffect、useEffect的区别
前端·javascript·react.js
坚持学习前端日记10 分钟前
Agent AI 后端接口对接与大模型适配指南
前端·人工智能·python·ios
坚持学习前端日记14 分钟前
Agent AI 多模态交互与全场景架构设计
前端·javascript·人工智能·visual studio
王家视频教程图书馆16 分钟前
vue3移动端组件库清单
前端
毕设源码-郭学长17 分钟前
【开题答辩全过程】以 基于web的车辆检测管理系统的设计与实现为例,包含答辩的问题和答案
前端
向上的车轮23 分钟前
TypeScript 一日速通指南:以订单管理系统实战为核心
前端·javascript·typescript
yqzyy26 分钟前
Nginx 配置:alias 和 root 的区别
前端·javascript·nginx
冰糖雪梨dd31 分钟前
【JavaScript】 substring()方法详解
开发语言·前端·javascript