好看的三角与label

好看的label 和好看的三角

在这里插入图片描述
label部分

<template>
  <div>
    <div class="jzlabel"> {{text}} <span class="triangle-left"></span>
    </div>
    <br>
  </div>
</template>
<script>
export default {
  props: {
    text: String
  },
};

</script>
<style scoped lang="scss">
.jzlabel {
  margin-left: -10px;
  text-indent: 40px;
  background: rgb(32, 88, 230);
  height: 30px;
  line-height: 30px;
  font-size: 16px;
  // font-weight: bold;
  color: white;
  display: inline-block;

  .triangle-left {
    width: 0;
    height: 0;
    padding-right: 40px;
    border-top: 15px solid transparent;
    border-right: 20px solid white;
    border-bottom: 15px solid transparent;
    float: right;
    ;
  }
}

</style>

好看的三角


<div class="sjContainer" v-for="(item,index) in familyList" :key="index">
      <div class="sjright" @click="handleRemove(index)"><span>x</span></div>
      <div class="sjleft"><span>{{index+1}}</span></div>
    </div>
 .sjContainer {
   position: relative;
   margin-bottom: 10px;
 }

 .sjright {
   // color: white;
   margin-top: -10px;
   border-left: 40px solid transparent;
   border-right: 40px solid rgb(32, 88, 230);
   border-bottom: 40px solid transparent;
   height: 0;
   width: 0;
   position: absolute;
   right: 0px;
   z-index: 2;
   cursor: pointer;

   span {
     margin-top: 2px;
     margin-left: 22px;
     position: absolute;
     color: white;
   }
 }

 .sjleft {
   // color: white;
   margin-top: -10px;
   border-right: 40px solid transparent;
   border-top: 40px solid rgb(32, 88, 230);
   height: 0;
   width: 0;
   position: absolute;
   left: 0px;
   z-index: 2;

   span {
     margin-top: -37px;
     margin-left: 5px;
     position: absolute;
     color: white;
   }
 }

交流 QQ群 312359522

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值