<div class="bottom-nav">
<div class="two">11</div>
<div class="line"></div>
</div>
<style>
.line {
width: 80%;
height: 22px;
background-color: #f7fcf7;
position: absolute;
bottom: 0px;
border-top: #e81111 2px solid;
}
.two {
width: 50px;
height: 50px;
background-color: #f3f1f1;
position: absolute;
bottom: 0;
left: 30%;
text-align: center;
border-radius: 50px 50px 0 0; /* 圆角设置为上半部分圆角 */
border: black 1px solid;
color: #e81111;
}
</style>
实现原理,一个长方形+圆形 给他压上即可