<view> <canvas class="canvas" style="opacity: 0;width: 100%; height: 100%;" canvas-id="firstCanvas"></canvas> <camera device-position="back" flash="off" binderror="error" style="position: absolute;top:0;left:0;z-index:999;width: 100%; height: 100%" bindstop="stopFn" class="camera"> <cover-view class="hallName">{{hallName}}</cover-view> <cover-view class="recognition-container" bindtap="takePhoto"> </cover-view> </camera></view> |
camera takePhoto 点击拍照,canvas 绘制相机拍照图片.
canvas 就盖住 camera了,页面效果就无法实时显示照相机里的内容。
我希望camera的层级一直是最高的该怎么弄呢?

请问解决了吗
.camera{position: absolute;top: 0;left: 0;bottom: 0;right: 0;z-index: 9999;}.canvas{position: absolute;top: 100%;left: 0;z-index: -1;opacity: 0;}