canvas无法被覆盖,超出元容器的部分也无法隐藏?

小程序 文章 2021-02-04 15:01 0 12 全屏看文

canvas无法被覆盖,超出元容器的部分也无法隐藏?Canvas cannot be overwritten, and the part beyond the meta container cannot be hidden?

canvas无法被覆盖,超出元容器的部分也无法隐藏?

遇到的问题如图:

圈出来的部分无法被下面的元素覆盖,下面是view,如果改成covew-view可以覆盖,但是里面的输入框textarea无法显示

换种思路 用个容器把canvas包起,超出隐藏,模拟器上可以,真机无效,如图:

红色背景为容器

The problems encountered are as follows: the circled part cannot be covered by the following elements, and the following is view. If it is changed to covew view, it can be covered, but the textarea in the input box cannot be displayed. In another way, use a container to wrap the canvas. If it is beyond hiding, it can be covered on the simulator, but the real machine is invalid, as shown in the figure: the red background is the container

回答:

乐豆信息:

把canvas元素通过定位移出屏幕即可

MORNINGSTART:

那就把canvas

隐藏掉不就行了吗,画出的图片直接替换画布

卢霄霄:

看得见的部分是canvas转成的图片

-EOF-