<div class="planItem">
<div class="planSelect">
</div>
</div>
css:
.planItem{
width: 100px;
height: 50px;
text-align: center;
float: left;
position: relative;
}
.planSelect{
position: absolute;
top: -50px;
right: -70%;
display: flex;
background-color: #fff;
padding: 10px;
}
因为planselect还有一个箭头对着planitem,感觉我这种写法如果planSelect变长,它的箭头就不会对其planitem,有没有更好的方法,让planSelect无论长度如何改变,始终居中正对planItem