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>

具体实现效果:

相关推荐
小郝同学(恩师白云)19 分钟前
SpringMVC后续4
java·服务器·前端
优联前端1 小时前
uni-app-通过vue-cli命令行快速上手
开发语言·前端·vue.js·uni-app·优联前端
点燃银河尽头的篝火(●'◡'●)2 小时前
【BurpSuite】Cross-site scripting (XSS 学徒部分:1-9)
前端·web安全·网络安全·xss
Jiaberrr2 小时前
手把手教你:微信小程序实现语音留言功能
前端·微信小程序·小程序·语音·录音
熊猫在哪2 小时前
安装nuxt3
前端·nuxt.js
安冬的码畜日常3 小时前
【CSS in Depth 2 精译_036】5.6 Grid 网格布局中与对齐相关的属性 + 5.7本章小结
前端·css·css3·html5·网格布局·grid·css网格
啧不应该啊4 小时前
vue配置axios
前端·javascript·vue.js
Zww08914 小时前
html,css基础知识点笔记(二)
css·笔记·html
__fuys__4 小时前
【HTML样式】加载动画专题 每周更新
前端·javascript·html
给bug两拳4 小时前
HTML/CSS/JS学习笔记 Day5(CSS--C2 元素的显示模式)
css