VUE div的右上角的角标/标签

一、效果图

二、代码

javascript 复制代码
<div class="comp-overview">
  <div class="overview-item" v-for="(item,index) in overviewInfoList" :key="index">
    <div class="angle_mark">
      <span>{{item.label}}</span>
    </div>
    <div class="home-chart-title">
      <span>{{item.title}}</span>
    </div>
  </div>
</div>
css 复制代码
.overview-item {
  //父容器
  position: relative;

  display: inline-block;
  width: 32.6%;
  color: #7c979e;
  font-size: 16px;
  margin-right: 1%;
  margin-bottom: 18px;
  height: 206px;
  border-radius: 4px;
  background: #FFFFFF;
  border: 1px solid rgba(136, 136, 136, 0.1);
  padding: 20px 17px 0;

  // 角标
  .angle_mark {
    position: absolute;
    top: 0;
    right: 0;
    width: 58px;
    height: 25px;
    border-radius: 0 3px 0 4px;
    background: rgba(52, 117, 235, 0.1);

    // 角标文字
    span {
      position: absolute;
      display: inline-block;
      width: 100%;
      text-align: center;
      font-family: 思源黑体;
      font-size: 12px;
      font-weight: normal;
      line-height: 25px;
      color: #3475EB;
    }
  }
}
相关推荐
山河木马5 分钟前
矩阵专题1-怎么创建模型矩阵(uModelMatrix)
javascript·webgl·计算机图形学
陆枫Larry34 分钟前
可滚动页面背景填不满:`height: 100vh` vs `min-height: 100vh`
前端
Patrick_Wilson37 分钟前
Squash Merge 的血缘陷阱:为什么删掉的代码又活了过来
前端·git·程序员
kyriewen1 小时前
今天的科技圈,全在抢英伟达的饭碗
前端·面试·ai编程
SouthernWind2 小时前
RAGFlow——结合本地知识库检索开发实战指南(包含聊天、检索本地的知识库文档和Agent模式)
前端
三翼鸟数字化技术团队2 小时前
websocket及SSE原理解析
前端
白鲸开源2 小时前
Apache SeaTunnel Zeta Engine 的 Basic Auth 是怎么工作的?
java·vue.js·github
妙码生花2 小时前
从 PHP 到 AI + Golang,程序员自救转型手记(八):设计管理员模型、热重载配置
前端·后端·go
卤蛋fg62 小时前
vue 甘特图 vxe-gantt 的使用(四):周视图的渲染
vue.js