本部分的视频讲解请到B站搜索“风林248”,查看视频《Web前端技巧-CSS绘图》。
形态1
代码:
<style>
.bubble{
/*气泡图*/
width: 150px;
font-size: 14px;
text-align: center;
padding: 15px 0;
border: 2px solid #ff404b;/*边框*/
border-radius: 20px;
background-color: #fefcc9;/*背景*/
position: relative;
}
.bubble::before{
/*背景三角形*/
content: "";
position: absolute;
top: 50px; /*调整块大小时需调节三角位置*/
left: 100px;
width: 0;
height: 0;
border-top: 20px solid #ff404b;/*与边框同色*/
border-left