如第一张图,换行后就另起一行了,希望效果能够像第二张图一样,依次排列后换行,求指教
<view class="wehicle-top">
<text class="top">顶</text>
<text class="start">{{wehicle.startPoint}}</text>
<text class="arrow">→</text>
<text class="end">{{wehicle.goal}}</text>
<text wx:if="{{wehicle.carpool == '我要找人'}}" class="pass">({{wehicle.pass}}但是沃尔沃温热热私人而色色是二色)</text> <!--途径-->
</view>
WXSS代码:
.wehicle-top{
display:flex;
justify-content:flex-start;
flex-flow:wrap;
}
.wehicle-top .top{
margin-right:10rpx;
background-color:red;
padding:0 10rpx;
border-radius:10rpx;
font-size:28rpx;
color:#fff;
}
.wehicle-top .start{
font-size:32rpx;
font-weight:700;
margin-right:10rpx;
}
.wehicle-top .arrow{
font-size:32rpx;
font-weight:700;
margin-right:10rpx;
}
.wehicle-top .end{
font-size:32rpx;
font-weight:700;
margin-right:10rpx;
}
.wehicle-top .pass{
font-size:28rpx;
font-weight:700;
}
试试text的样式里面加个display: inline
.wehicle-top {word-break: break-all;}