就是要灵活, 浮动不行,就定位,定位不行,就flex 反正只要能写出来 就行了
css
.paihang{
background:#CCC;
width:100%;
}
.paihang-desc {
position: relative;
padding: 10rpx 10rpx;
width: 100%;
height: 100rpx;
line-height: 100rpx;
border: 1px solid red;
}
.fr {
position: absolute;
right: 20rpx;
top:50%;
margin-right: 20rpx;
transform: translateY(-50%);
border: 1px solid red;
border-radius: 14rpx;
padding: 10rpx;
height: 40rpx;
font-size:28rpx;
line-height: 40rpx;
}