且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在画布上绘制不透明的图像

更新时间:2022-06-23 23:42:55

使用 globalAlpha 但请确保在绘制图像之前设置它:

Use globalAlpha but make sure that you set it before drawing the image:

ctx.globalAlpha = 0.4;