html2canvas不转换具有渐变样式的html

时间:2016-11-03 13:04:46

标签: javascript html css html2canvas

bars with gradient color not getting converted我使用“html2canvas”+将html图表更改为图片。当条形图具有黑色样式时,其转换得很好。但是当html条具有渐变CSS时,它不会被转换。在此处附加屏幕截图。

        html2canvas(elementDom, {[enter image description here][1]
        onrendered: function (canvas) {
            getCanvas = canvas;
            var imgageData = getCanvas.toDataURL("image/png");
            var newData = imgageData.replace('data:image/png;base64,','');
            });

bars with black color gets converted

0 个答案:

没有答案