I believe that many times, everyone will encounter the need to use canvas to generate pictures.
Of course I also encountered it. After generating the canvas in the wxml page of the project, I found out how to add css to the canvas tag. I can't prevent the canvas from affecting the page.
<canvas> // 无论是opacity 还是 z-index 都无法解决,多多少少会影响 </canvas>
After thinking about it for a while, I came up with the following solution: Add a parent tag to the outer layer of
canvas
, and then Control the display of the parent tag
<view> //让父标签 0宽 0高 隐藏溢出 <canvas> </canvas> </view>
If the above does not work, please see the following:
<canvas> // 直接让canvas 飞到天际, 简单粗暴; 使用时注意 position的问题; 如果 fixed不行, 换其他定位试试 </canvas>
ok .. Come on and write the code...
Recommended tutorial: " WeChat Mini Program》
The above is the detailed content of Solving the problem of mini program canvas hiding. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1
Easy-to-use and free code editor

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)