.ribbon {
        background: #45c9c8;
        position: absolute;
        width: 75px;
        height: 25px;
        line-height: 25px;
        top: -4px;
        left: -11px;
        font-size: 14px;
        color: #fff;
        text-align: center;
        font-style: normal;
        z-index: 1;
        &:after{
            content: "";
            position: absolute;
            width: 0;
            height: 0;
            border-left: 12px solid transparent;
            border-top: 5px solid #329c9b;
            top: 25px;
            left: 0px;
            z-index: 0;
        }
        &:before{
            content: "";
            position: absolute;
            right: -10px;
            font-size: 14px;
            color: #fff;
            z-index: 1;
            width: 0;
            height: 0;
            border-top: 13.5px solid #45c9c8;
            border-left: 5px solid #45c9c8;
            border-right: 10px solid transparent;
            border-bottom: 12.5px solid #45c9c8;
        }
    }

  利用伪选择器after和before写了一个丝带标签

相关文章:

  • 2021-07-14
  • 2021-12-04
  • 2021-09-01
  • 2021-06-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-11-27
  • 2021-08-04
  • 2022-12-23
相关资源
相似解决方案