“cover-view”组件“display:fixed” 在IOS下有问题
发布于 4 年前 作者 molei 18249 次浏览 来自 问答

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

* 手机上正常的效果

*  手机上的有问题的效果

* 开发工具上debugger

template:

<cover-view class="tabbar_bottom">
      <cover-view
        class="footer-btn"
        style="opacity:{{currentDoingQuestionNo > 1 ? 1 : 0.5}};"
        [@tap](/user/tap)="handlePrevTap"
      >
        <cover-image class="footer-btnImg" style="margin-right:20rpx;" src="../static/img/exercisePage/[email protected]" />
        <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/[email protected]" />
      </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 回复

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

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

回到顶部