收藏
回答

scroll-view中view嵌套大量小view后小view会超出来往下排

问题模块
API和组件

刚开始学,我在官方文档给的scroll-view例子中添加了几个view

<view class="section__title">vertical scroll</view>

    <scroll-view class='scrollview' scroll-y style="height: 400px;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">

        <view id="green" class="scroll-view-item bc_green">

            //新添加的view↓

            <view class='aaa'>view</view>

            <view class='aaa'>view</view>

            <view class='aaa'>view</view>

            <view class='aaa'>view</view>

            //新添加的view↑

        </view>

    <view id="red"  class="scroll-view-item bc_red"></view>

    <view id="yellow" class="scroll-view-item bc_yellow"></view>

    <view id="blue" class="scroll-view-item bc_blue"></view>

</scroll-view>


我没给id=green的view设置固定高度,里面的class='aaa'的view如果太多会超出来

怎么能不设置固定高度,让id=green的view被撑起来,不会弄啊。。


最后一次编辑于  2017-09-25  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答