I need to draw stroke using mousemove behind or under a transparent png image on a canvas tag.
#canvas{
background:../images/wat.png ;}
Using css is not useful because stroke will affect background image. The .png image must be intact. I`ve also tried the following function:
function make_base()
{
base_image = new Image();
base_image.src = '../images/wat.png';
base_image.onload = function(){
ctx.drawImage(base_image, 0, 0,window.innerWidth, window.innerHeight);
}
使用CSS解决:
pointer-event: none;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.