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>

具体实现效果:

相关推荐
前端小巷子几秒前
JS浮点数精度问题
开发语言·前端·javascript·面试
小小小小宇10 分钟前
前端滚动穿透笔记
前端
满怀101519 分钟前
【Vue 3全栈实战】从组合式API到企业级架构设计
前端·javascript·vue.js·typescript
明似水26 分钟前
Flutter 包依赖升级指南:让项目保持最新状态
前端·flutter
前端snow38 分钟前
项目密码加密你是选择bcrypt还是crypto
前端·后端
航Hang*1 小时前
WEBSTORM前端 —— 第3章:移动 Web —— 第2节:空间转换、转化
前端·笔记·程序人生·edge·css3·html5·webstorm
霸王蟹1 小时前
从前端工程化角度解析 Vite 打包策略:为何选择 Rollup 而非 esbuild。
前端·笔记·学习·react.js·vue·rollup·vite
EndingCoder1 小时前
React从基础入门到高级实战:React 生态与工具 - 构建与部署
前端·javascript·react.js·前端框架·ecmascript
胡桃夹夹子1 小时前
【前端优化】使用speed-measure-webpack-plugin分析前端运行、打包耗时,优化项目
前端·webpack·node.js
洋流1 小时前
0基础学习,深夜写文章,励志进大厂系列,第2天:JS预编译
javascript