css实现左右内凹圆

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    /* 详情页面 */
    .detail-wrapper {
        background-color: skyblue;
        padding: 10px;
    }
    .detail-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #FFF;
    }
    .title {
        font-size: 16px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #333333;
        line-height: 24px;
        margin-bottom: 24px;
    }
    .price {
        font-size: 28px;
        font-family: DINAlternate-Bold, DINAlternate;
        font-weight: bold;
        color: #0D0D0D;
        line-height: 28px;
        margin-bottom: 16px;
    }
    .balance {
        font-size: 14px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #808080;
        line-height: 14px;
    }
    .line-wrapper {
        width: 100%;
        height: 20px;
        position: relative;
        display: flex;
        justify-content: space-between;
    }
    .line-wrapper::before {
        content: "";
        width: 100%;
        height: 10px;
        border-bottom: 1px dashed red;
    }
    .left,.right {
        position: absolute;
        width: 20px;
        height:20px;
        border-radius:50%;
        background-color: skyblue;
    }
    .left {
        top: 50%;
        left: 0;
        transform: translate(-50%, -50%);
    }
    .right {
        top: 50%;
        right: 0;
        transform: translate(50%, -50%);
    }
    </style>
</head>
<body>
    <div class="detail-wrapper">
        <div class="detail-content">
            <div class="title">消费商户名称消费商户名称消费商户名称消费商户</div>
            <div class="price">- ¥ 2,892.00</div>
            <div class="balance">余额:¥2,892.00</div>
            <div class="line-wrapper">
                <span class="left"></span>
                <span class="right"></span>
            </div>
            <div class="content">
                <div class="balance">余额:¥2,892.00</div>
                <div class="balance">余额:¥2,892.00</div>
                <div class="balance">余额:¥2,892.00</div>
                <div class="balance">余额:¥2,892.00</div>
            </div>
        </div>
    </div>
</body>
</html>

具体实现效果:

相关推荐
烟袅14 分钟前
JavaScript 变量声明报错指南:var、let、const 常见错误解析
javascript
烟袅16 分钟前
告别 var!深入理解 JavaScript 中 var、let 和 const 的差异与最佳实践
javascript·面试
烛阴18 分钟前
循环背后的魔法:Lua 迭代器深度解析
前端·lua
元拓数智31 分钟前
现代前端状态管理深度剖析:从单一数据源到分布式状态
前端·1024程序员节
mapbar_front35 分钟前
Electron 应用自动更新方案:electron-updater 完整指南
前端·javascript·electron
天一生水water1 小时前
three.js加载三维GLB文件,查看三维模型
前端·1024程序员节
无风听海1 小时前
HarmonyOS之启动应用内的UIAbility组件
前端·华为·harmonyos
冰夏之夜影1 小时前
【科普】Edge出问题后如何恢复出厂设置
前端·edge
W.Buffer2 小时前
设计模式-单例模式:从原理到实战的三种经典实现
开发语言·javascript·单例模式
葱头的故事2 小时前
vant van-uploader上传file文件;回显时使用imageId拼接路径
前端·1024程序员节