使用伪类处理
<view class="twoBox">
<view class="numBox">
<view class="num">1999view>
<view class="numTxt">关注view>
view>
<view class="numBox">
<view class="num">1999view>
<view class="numTxt">粉丝view>
view>
<view class="numBox">
<view class="num">1999view>
<view class="numTxt">获赞数view>
view>
view>
.twoBox{
margin: 0 25rpx;
height: 113rpx;
background: rgba(255,255,255,0.45);
border-radius: 15rpx 15rpx 15rpx 15rpx;
display: flex;
justify-content: space-between;
align-items: center;
.numBox{
text-align: center;
flex: 1;
flex-shrink: 0;
position: relative;
.num{
font-weight: bold;
font-size: 28rpx;
color: #3D3D3D;
}
.numTxt{
font-size: 24rpx;
color: #3D3D3D;
margin-top: 10rpx;
}
}
.numBox::after{
content: '';
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 1rpx;
height: 52rpx;
background-color: #CCD0D4;
}
.numBox:last-child::after {
display: none;
}
}