鼠标移入展示字体操作

鼠标移入展示字体

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

复制代码
        <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;
      }
    }
相关推荐
kyriewen116 小时前
你点的“刷新”是假刷新?前端路由的瞒天过海术
开发语言·前端·javascript·ecmascript·html5
Timer@8 小时前
LangChain 教程 04|Agent 详解:让 AI 学会“自己干活“
javascript·人工智能·langchain
阿珊和她的猫8 小时前
TypeScript中的never类型: 深入理解never类型的使用场景和特点
javascript·typescript·状态模式
skywalk81638 小时前
Kotti Next的tinyfrontend前端模仿Kotti 首页布局还是不太好看,感觉比Kotti差一点
前端
RopenYuan10 小时前
FastAPI -API Router的应用
前端·网络·python
走粥10 小时前
clsx和twMerge解决CSS类名冲突问题
前端·css
Purgatory00111 小时前
layui select重新渲染
前端·layui
weixin1997010801611 小时前
《中国供应商商品详情页前端性能优化实战》
前端·性能优化
九皇叔叔12 小时前
003-SpringSecurity-Demo 统一响应类
java·javascript·spring·springsecurity