定位写竖线

 .grid {
            position: relative;

            &:first-child::before {
                content: '';
                width: 1px; //边框宽度
                height: 100px; //边框长度
                position: absolute;
                right: 0; //设置为右边框
                top: 10px; //在距离顶部88px的地方开始绘制边框
                background-color: #DAE7F9; //边框的颜色
            }

            width: 180px;

            border-bottom: 1px solid #DAE7F9;
            text-align: center;

            .number {
                margin-top: 10px;
                color: #2570F2;
                font-weight: 600;
                font-size: 16px;

            }

            .desc {
                font-size: 14px;
                color: #909399;
            }
        }
    }
}

  

 

posted @ 2022-12-23 18:59  林逸夫  阅读(19)  评论(0编辑  收藏  举报