html2canvas:The image argument is a canvas element with a width or height of 0.

DOMException: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.

html2canvas渲染渐变色报错的

background-image: linear-gradient(180deg, rgba(0,103,178,0.6) 0%, rgba(50,148,219, 0.6) 99%);

我直接改成background就可以打印了

http://html2canvas.hertzen.com/features

html2canvas:The image argument is a canvas element with a width or height of 0.

 但是他们官网是支持这个css  

继续找原因  先换成background用了

上一篇:Photoshop制作漂亮个性的新年签名教程


下一篇:frontEnd++:使用 html2canvas 实现浏览器截图