收藏
回答

scroll-view弹性布局align-items异常

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug scroll-view 微信iOS客户端 System: iPhone, iOS 16.3.1, WeChat 8.0.33 WeChatLib: 2.30.4 (2023.3.30 23:34:48)

<scroll-view
    class="sv"
    scroll-x
    enable-flex
    show-scrollbar="{{false}}"
    enable-passive
    enhanced
>
    <view
        class="v"
    >
        align-items: flex-start
    </view>
</scroll-view>


<scroll-view
    class="sv"
    scroll-x
    enable-flex
    show-scrollbar="{{false}}"
    enable-passive
    enhanced
>
    <view
        class="v"
    >
        align-items: center
    </view>
</scroll-view>


<scroll-view
    class="sv"
    scroll-x
    enable-flex
    show-scrollbar="{{false}}"
    enable-passive
    enhanced
>
    <view
        class="v"
    >
        align-items: flex-end
    </view>
</scroll-view>


.sv {
    display: flex;
    flex-direction: row;
    justify-content: center;


    background-color: pink;
    height: 56px;


    margin-bottom: 32px;
}
.sv:first-of-type {
    align-items: flex-start;
}
.sv:nth-of-type(2) {
    align-items: center;
}
.sv:last-of-type {
    align-items: flex-end;
}


.v {
    background-color: lime;
}
回答关注问题邀请回答
收藏
登录 后发表内容