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>

具体实现效果:

相关推荐
Mh1 小时前
Three.js 实现 3D 汽车交互2.0版本
前端·three.js
2601_958352903 小时前
I2S转模拟音频,真的只要5个引脚+1个电容?
前端·人工智能·单片机·嵌入式硬件
workflower4 小时前
如何培养FDE-3
前端·网络·安全·机器人·自动化
小小测试开发5 小时前
rsync 源路径少一个斜杠,--delete 删的就不是你以为的那一层
java·前端·数据库·人工智能
智购科技无人售货机工厂店6 小时前
自动售货机刷脸支付集成实战:活体检测与合规门槛~YH
java·服务器·前端·科技·零售
其实防守也摸鱼8 小时前
Day 3 · Agent Loop:从调用模型到控制循环 —— 课件精讲笔记
服务器·开发语言·javascript·数据库·人工智能·笔记·ecmascript
夕水8 小时前
我把颜色选择器拆成了 15 个插件,最后长成了 22 个包
前端·javascript·typescript
大今野8 小时前
2026 专转本计算机|移动互联网关键技术:SOA、Web2.0 与 HTML5 考点全解(附例题)
前端·html·html5·专转本
JudithHuang8 小时前
Vue3 与后端联调:代理、Mock 与接口约定
前端·vue