制造聊天气泡,准备一个div类名fa,如下代码:
.fa {
margin: 100px auto;
width: 80px;
height: 40px;
border: 1px solid #000;
position: relative;
/* overflow: hidden; */
}
.fa::before {
content: "";
display: block;
position: absolute;
left: 20px;
top: 41px;
width: 0;
height: 0;
border: 8px solid transparent;
border-top-color: #000;
}
.fa::after {
content: "";
display: block;
position: absolute;
left: 20px;
top: 40px;
width: 0;
height: 0;
border: 8px solid transparent;
border-top-color: #fff;
}
效果图: