div 加四个边角
电脑版发表于:2020/11/17 19:35
效果图
代码如下
<div class="boxall">
sss
<div class="boxfoot"></div>
</div>
css
css
.boxall {
border: 1px solid rgba(25, 186, 139, .17);
padding: 0rem .3rem .3rem;
position: relative;
margin-bottom: 1rem;
}
.boxall:before,
.boxall:after {
position: absolute;
width: 0.5rem;
height: 0.5rem;
content: "";
border-top: 2px solid #02a6b5;
top: 0;
}
.boxall:before,
.boxfoot:before {
border-left: 2px solid #02a6b5;
left: 0;
}
.boxall:after,
.boxfoot:after {
border-right: 2px solid #02a6b5;
right: 0;
}
.boxfoot {
position: absolute;
bottom: 0;
width: 100%;
left: 0;
}
.boxfoot:before,
.boxfoot:after {
position: absolute;
width: 0.5rem;
height: 0.5rem;
content: "";
border-bottom: 2px solid #02a6b5;
bottom: 0;
}