“cover-view”组件“display:fixed” 在IOS下有问题

发布于 6 年前作者 molei18531 次浏览最后编辑 6 年前来自 ask

在开发工具上做真机调试。

* 手机上正常的效果

*  手机上的有问题的效果

* 开发工具上debugger

template:

<cover-view class="tabbar_bottom">
      <cover-view
        class="footer-btn"
        style="opacity:{{currentDoingQuestionNo > 1 ? 1 : 0.5}};"
        @tap="handlePrevTap"
      >
        <cover-image class="footer-btnImg" style="margin-right:20rpx;" src="../static/img/exercisePage/prev@2x.png" />
        <cover-view>上一题</cover-view>
      </cover-view>
      <cover-view
        class="footer-btn"
        style="opacity:{{currentDoingQuestionNo < questionIds.length ? 1 : 0.5}};"
        @tap="handleNextTap"
      >
        <cover-view style="margin-right:20rpx;">下一题</cover-view>
        <cover-image class="footer-btnImg" src="../static/img/exercisePage/next@2x.png" />
      </cover-view>
    </cover-view>

CSS:

.tabbar_bottom {
    position: fixed;
     
    left: 0;
    bottom: 0;
    z-index: 100000;
 
 
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
 
    width: 100%;
    height: 100rpx;
 
    border-top: 2rpx solid #f5f5f5;
    background: #fff;
 
}

这个问题只有在IOS下才有,安卓是好的。

2 回复
swei
swei1 楼6 年前

遇到同样的问题了,楼主解决了吗?

jun87
jun872 楼4 年前

cover-view时display:flex,好像没效果 可以试试line-height