0
点赞
收藏
分享

微信扫一扫

[css] before和:after实现div下方的小三角

大师的学徒 2022-12-21 阅读 126


[css] before和:after实现div下方的小三角_css

<div class="pop-box">aaa</div>

.pop-box {
position: absolute;
width: 250px;
height: 260px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
}

.pop-box:before {
content: "";
position: absolute;
z-index: 1;
bottom: -7px;
left: 116px;
width: 0;
height: 0;
border-style: solid;
border-width: 8px 8px 0;
border-color: #fff transparent transparent;
}

.pop-box:after {
content: "";
position: absolute;
bottom: -8px;
left: 116px;
width: 0;
height: 0;
border-style: solid;
border-width: 8px 8px 0;
border-color: #ccc transparent transparent;
}

​​css使用:before和:after实现div下方的小三角​​


举报

相关推荐

0 条评论