当前位置: 首页 > article >正文

css实现antd丝带效果

先上效果图:

代码:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .ant-ribbon {
        box-sizing: border-box;
        margin: 0;
        padding: 0 8px;
        color: #1677ff;
        font-size: 14px;
        line-height: 22px;
        list-style: none;
        position: absolute;
        top: 8px;
        white-space: nowrap;
        background-color: #1677ff;
        border-radius: 4px;
        border-end-end-radius: 0;
    }

    .ant-ribbon-text {
        color: #ffffff;
    }

    .ant-ribbon-placement-end {
        inset-inline-end: 8px;
        border-end-end-radius: 0;
    }

    .ant-ribbon-corner {
        position: absolute;
        top: 100%;
        width: 8px;
        height: 8px;
        color: currentcolor;
        border: 4px solid;
        transform: scaleY(0.75);
        transform-origin: top;
        filter: brightness(75%);
        box-sizing: border-box;
        inset-inline-end: 0;
        border-inline-end-color: transparent;
        border-block-end-color: transparent;
    }

</style>

<body>
    <div class="ant-ribbon ant-ribbon-placement-end">
        <span class="ant-ribbon-text">5.17.0</span>
        <div class="ant-ribbon-corner">
        </div>
    </div>
</body>

</html>


http://www.kler.cn/a/376850.html

相关文章:

  • ubuntu安装与配置Nginx(2)
  • 制造业中的主数据有哪些?
  • 【重生之我要苦学C语言】深入理解指针3
  • kafka里的consumer 是推还是拉?
  • [RootersCTF2019]ImgXweb
  • python实现了对一个数据集(从csv文件读取)的数据预处理、异常值检测、数据重构以及使用多种机器学习模型进行评估和调优的功能
  • selenium 点击元素报错element not interactable
  • 处理非结构化数据:Python中的BeautifulSoup库解析HTML
  • 扫描项目中存在高危风险依赖包升级处理。
  • 【016C】基于51单片机电子秤(LCD1602显示)
  • crc16 with word byte--查表法
  • 自动驾驶---理想汽车智驾进展
  • 计算机网络:网络层 —— IP 多播技术
  • 机器学习与数学公式
  • flutter报错‘/Users/xxx/.gradle/caches/journal-1/file-access.bin‘.
  • 【rust实战】rust博客系统4_连接数据库及查询数据
  • 重构响应对象
  • Dockerfile文件编写
  • linux perf 环境部署和基本测试(基于Ubuntu20.04)
  • 探讨Java深搜算法的学习笔记