cover-view在ios样式失效的问题
发布于 5 年前 作者 zhaofang 20201 次浏览 来自 问答

<view class=‘canvasCon’ style=“width:670rpx;height:850rpx” catchtap=‘closecanvas2’>

    <canvas canvas-id=“myCanvas” class=“canvas”>

        <cover-view bindtap=‘closecanvas’ class=“canvasView”>

            <cover-image class=“canvasImg” src=https://cms.hylpz.cn/data/images/common/close.png/>

        </cover-view>

    </canvas>

    <view class=“canvasButton” catchtap=‘canvasToTempFilePath’>保存图片</view>

</view>

其实就是想定位一个关闭的小叉,定位在右上角,安卓没问题,ios都出问题了…

wxss:

.page .canvasBox .canvasCon{

    top: 50%;

    left: 50%;

    margin-left: -335rpx;

    margin-top: -500rpx;

    position: relative;

    border-radius: 20rpx;

    z-index: 999;

    background: #fff;

}

.page .canvasBox .canvasCon .canvas .canvasView{

    display: block;

    width: 44rpx;

    height: 44rpx;

    position: absolute;

    top:0;

    right: 20rpx;

}

正确展示:

ios展示:

ios每次都会自己跑偏,请问这怎么调?

回到顶部