flex布局技巧

2022-09-08 16:04:08 浏览数 (1)

1.多个元素并列使最后一个元素永远靠右 设置该元素margin-left:auto即可

代码语言:javascript复制
<view class="flex align-center  bg-white" style="height: 85rpx;">
            <view class="iconfont icon-caidan"></view>
            <view class="iconfont icon-huati"></view>
            <view class="iconfont icon-tupian" ></view>
            <view class="bg-main text-white" style="margin-left:auto">发送</view>//右浮动
        </view>

0 人点赞