SOURCE

console 命令行工具 X clear

                    
>
console
<div class="b-body">
</div>
<div class="box">hello</div>



<div class="bd1">
    <div class="box1">hello</div>
</div>

<div class="box"></div>
body{
    background: #000;
}

/* 版本1 */
.b-body{
    height: 100px;
    width: 100px;
    background: linear-gradient(to top, cyan 70%, palegoldenrod 30%);
    clip-path: polygon(0% 0%, 0% 100%, 1% 100%, 1% 1%, 99% 1%, 99% 99%, 1% 99%, 1% 100%, 100% 100%, 100% 0%);
}
.box{
    position: absolute;
    text-align: center;
    margin: 15px;
    width: 50px;
    height: 50px;
    color: white;
    background-color: gold;
    z-index: 100;
    top: 4%;
}


/* 版本2 */
.bd1{
    margin: 5px;
    height: 100px;
    width: 100px;
    border: 4px solid;
    border-image: linear-gradient(to top, cyan 70%, palegoldenrod 30%) 1;
}
.box1{
    text-align: center;
    margin: 15px;
    width: 50px;
    height: 50px;
    color: white;
    background-color: gold;
}