收藏
回答

ios10.3.3 flex布局不支持flex:1吗?

.gCon {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  width100vw;
  height100vh;
}


.gCon .Tab {
  width100%;
  height88rpx;
}

.gCon > swiper {
  flex1;
  width100%;
}

iOS0.3.3 swiper高度还是默认高度,并没有占据剩余空间
回答关注问题邀请回答
收藏

3 个回答

  • 💡
    💡
    2020-10-23

    swiper 有默认高度 150px, 需要给 swiper 一个固定高度。例如:100vh

    2020-10-23
    有用 1
    回复 1
    • 昊
      2020-10-27
      我给了个100%
      2020-10-27
      回复
  • 卢霄霄
    卢霄霄
    2020-10-23

    没有10.3.3的机器试,只能提供几个尝试你挨个试试吧。。

    1、把 swiper换成一个普通的 view,这样flex:1有效吗?有效的话,可以swiper外面包个flex:1的view,然后swiper 100%高

    2、flex: 1换成 flex-grow: 1;

    3、试试给 swiper增加不同的 position 及overflow属性

    2020-10-23
    有用 1
    回复
  • 子不语
    子不语
    2020-10-23

    弄一个 [ 能复现问题的简单的 ] 代码片段,我帮你看看

    https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    请学会如何「提问」(👈戳我)
    【个体工商户】微信认证问题(👈戳我)

    2020-10-23
    有用
    回复 5
    • 昊
      2020-10-23
      https://developers.weixin.qq.com/s/1F9oxjmz7Tls
      2020-10-23
      回复
    • 昊
      2020-10-23
      正常下面的swiper应该撑满剩下的空间,但是10.3.3就不会
      2020-10-23
      回复
    • 子不语
      子不语
      2020-10-23回复
      10.3.3?这是很老的了吧?

      不要再问我小尾巴了啦!!!

      2020-10-23
      回复
    • 昊
      2020-10-23回复子不语
      就是比较老,但是甲方有人用,说是习惯了
      2020-10-23
      回复
    • 子不语
      子不语
      2020-10-23回复
      ……

      不要再问我小尾巴了啦!!!

      2020-10-23
      回复
登录 后发表内容
问题标签