CSS 分割线

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box{
            width: 300px;
            /* border: 1px solid red; */
        }
        .line{
            margin: 20px 0;
            line-height: 1px;
            border-left: 50px solid #ddd;
            border-right: 150px solid #ddd;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="line">
            this is line
        </div>
    </div>
</body>
</html>

 

posted @ 2019-10-28 19:53  敲代码的树先生  阅读(3315)  评论(0编辑  收藏  举报