Flex layout

<view style="display:flex">
  <view style="display:flex;flex:1;flex-direction:column;align-items:stretch;">
    <view class="">:<text style="color:-sharpff0000">{{ sum - promTotal }}</text></view>
    <view style="display:flex;">
      <view style="margin-right:30rpx;">:{{ sum }}</view>
      <view style="flex:1;">:-{{ promTotal }}</view>
    </view>
  </view>
  <view style="background-color:-sharpff0000;align-items:stretch" bindtap="placeAnOrder"></view>
</view>

clipboard.png

under the existing style, how to center the "to place an order" on the picture vertically?

Feb.28,2021

wrap "to place an order" with a layer of flex container, align-items:center " control vertical center

   

Menu