部分机型fit-content无法正常显示
发布于 5 年前 作者 leifu 9641 次浏览 来自 问答

width: fit-content 部分机型不能正常使用(iPhone 5S, iOS 10.3.3)

效果图如下

iPhone 5S: https://ws2.sinaimg.cn/large/006tNc79ly1fostfmm11pj30gy0u0abs.jpg

其他: https://ws3.sinaimg.cn/large/006tNc79ly1fostf0n45pj30gy0u0abs.jpg

<view class="indicator-container" wx:if="{{imageLength > 1}}">
      <view class="indicators">
        <block wx:for="{{images}}" wx:key="index">
          <view class="indicator {{(currentIndex === index)?'active':''}} {{(index !== 0)?'margin-left-enable':''}}"></view>
        </block>
        <view style="clear: both"></view>
      </view>
    </view>
.indicator-container {
    position: absolute;
    bottom: 35rpx;
    width: 100%;
    height: 10rpx;
  }
  .indicators {
    width: fit-content;
    margin: auto;
  }
  .indicator {
    float: left;
    height: 10rpx;
    width: 10rpx;
    background-color: rgb(230, 230, 230);
  }
  .active {
    background-color: black;
    width: 38rpx;
  }
  .margin-left-enable {
    margin-left: 22rpx;
  }
1 回复

请问有人没,急求

回到顶部