美文网首页
2023-07-31 Step步骤条自己画的思路

2023-07-31 Step步骤条自己画的思路

作者: gdlooker | 来源:发表于2023-07-30 11:49 被阅读0次
<!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>
        .container {
            width: 100%;
            height: 30px;
            display: flex;
            flex-direction: row;
            position: relative;
            background-color: red;
        }

        .content {
            width: 20%;
            height: 26px;
            line-height: 26px;
            position: relative;

        }

        .num {
            width: 26px;
            height: 26px;
            line-height: 26px;
            border-radius: 13px;
            background-color: #0085FF;
            text-align: center;
            color: #fff;
            position: absolute;
            left: calc(50% - 13px);
            z-index: 1;
        }

        .content::after {
            content: ' ';
            width: calc(50% - 13px);
            /* min-width: calc(50% - 13px); */
            height: 2px;
            min-height: 2px;
            position: absolute;
            /* display: inline-block; */
            background-color: yellow;
            top: 14px;
            right: 0px;
        }

        .content::before {
            content: ' ';
            width: calc(50% + 13px);
            /* min-width: calc(50% - 13px); */
            height: 2px;
            min-height: 2px;
            position: absolute;
            /* display: inline-block; */
            background-color: green;
            top: 14px;
            left: 0px;

        }

        .content:nth-child(1)::before {
            width: 0;
        }

        .content:nth-last-child(1)::after {
            width: 0;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="content">
            <div class="num">1</div>
        </div>
        <div class="content">
            <div class="num">2</div>
        </div>
        <div class="content">
            <div class="num">3</div>
        </div>
        <div class="content">
            <div class="num">4</div>
        </div>
        <div class="content">
            <div class="num">5</div>
        </div>
        <div class="content">
            <div class="num">6</div>
        </div>
    </div>
</body>

</html>

相关文章

网友评论

      本文标题:2023-07-31 Step步骤条自己画的思路

      本文链接:https://www.haomeiwen.com/subject/uxlspdtx.html