收藏
回答

cover-view在ios样式失效的问题

API/组件名称 终端类型 微信版本 基础库版本
cover-view 工具 v6.6.1 最新

<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每次都会自己跑偏,请问这怎么调?

回答关注问题邀请回答
收藏
登录 后发表内容