html2canvas 1.0.0-alpha.12无需背景样式即可获取快照

时间:2018-09-18 10:45:08

标签: javascript canvas background html2canvas

我在.png文件中有object(chair),并且正在通过更改背景色从jquery在浏览器上更改其颜色,并且效果很好。

This is output of after changing the color of chair

我的问题是,现在我正在尝试使用html2canvas js库保存此更改颜色的椅子图像,但是它可以保存图像而没有更改颜色的背景效果。

and this is output of saved image after changing color of chair

我的代码是使用1.0.0-alpha.12版本的html2canvas库将html转换为画布图像的代码:

html2canvas($("#chair")[0]).then(function(canvas) {
  $("#element-out").append(canvas);
});

帮助我保存具有改变椅子颜色的背景效果的图像。谢谢!

0 个答案:

没有答案