canvas层级问题?

小程序 文章 2022-04-07 13:00 814 0 全屏看文

AI助手支持GPT4.0

canvas层级问题?Canvas level problem?

canvas层级问题?

Canvas组件在开发者工具中可以使用z-index设置层级,但是到了手机端,就失效了,canvas组件始终位于页面最顶层,只能用隐藏来控制,请问如何解决这个问题呢?

The canvas component can use Z-index to set the hierarchy in the developer tool, but when it comes to the mobile terminal, it fails. The canvas component is always at the top of the page and can only be controlled by hiding. How do you solve this problem?

回答:

周先生:

1添加属性type=2d

2状态栏使用coverView实现

3在弹出层里面使用canvas

4在新页面使用canvas

小黎:

canvas用2d或者cover-view 具体是想实现什么效果

尐飞魚คิดถึง:

-EOF-

AI助手支持GPT4.0