0
html2canvas可以發送多個元素(document.body除外)嗎?說如果我不想基於頁面中的多個元素生成圖像,並且有幾個元素我不想渲染。我如何編輯此代碼?html2canvas插入多個元素呈現
html2canvas([ document.body] , {
onrendered: function(canvas) {
img = canvas.toDataURL();
window.open(img);
}
btw,window.open意味着我不想在不同的頁面上顯示圖像,而不會干擾原始的html數據。
它不起作用,因爲當我把它放在display:block中時,它會渲染display:block中的所有元素,就好像display:none沒有用 – godheaper