📜  半边框底部 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:52.293000             🧑  作者: Mango

代码示例1
div {
    width: 500px;
    height: 100px;
    position: relative;
    padding-top: 20px;
    margin-top: 50px;
}

div::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    width: 50%;
    left: 25%;
    border-top: 1px solid red;
}