html52.com
我爱小程序-开发者交流社区

swiper height:100% 在苹果手机上不显示

问题模块
API和组件

wxml:

<view class="MainContent">

  <view class="TopBlock">

  TopBlick

  </view>

  <view class="BottomBlock">

      <swiper>

        <swiper-item class="swiper-item">

        <scroll-view scroll-y class="scroll">

          <view class="item" wx:for="{{[1,1,1,1,1,1,1,1]}}">

            <view class="top"></view>

            <view class="bottom"></view>

          </view>

        </scroll-view>

        </swiper-item>

      </swiper>

  </view>

</view>






wxss:

page {

    height: 100%;

}

.MainContent {

    display: flex;

    flex-direction: column;

    height: 100%;

    width: 100%;

}

.TopBlock {

    height: 50px;

    background-color: orangered;

}

.BottomBlock {

    /*display: flex;*/

    flex: 1;

    background-color: blanchedalmond;

    overflow-y: auto;

    overflow: auto;

}

swiper {

    width: 100%;

    height: 100%;

    background-color: brown;

}

.swiper-item {

     width: 100%;

    height: 100%;

    background-color: brown;

}

.scroll {

    height: 100%;

    background-color: greenyellow;

}

.item {

    background-color: hotpink;

    margin-bottom: 10px;

}

.top {

    width: 50px;

    height: 50px;

    background-color: ghostwhite;

}

.bottom {

    width: 70px;

    height: 70px;

    background-color: cornflowerblue;

}



网友回复

Lack-money?™:

管理员呢?

Lack-money?™:

swiper 设置能百分比的话苹果手机不显示,模拟器和安卓正常。设置能固定高度所有设备能正常显示。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付