html2canvas不能css,html2canvas css overflow have no working

雨点打透心脏的1/2处 2022-10-10 09:27 118阅读 0赞

There is a div element, add img Child element with appendChild fun.

div overflow is hidden.

the img display a picture, and can be moved, zoomed and scaled.

if the img is bigger than div, and be moved or zoomed or scaled,

then i use html2canvas to the image, the img have be cut which the size is the same div.

if i set useOverflow true, have the problem

if i set useOverflow false, the img cannot be hidden.

html2canvas(document.body, {

allowTaint: true,

useCORS: true,

useOverflow: false,

onrendered: function (canvas) {

var blob = canvas.msToBlob();

发表评论

表情:
评论列表 (有 0 条评论,118人围观)

还没有评论,来说两句吧...

相关阅读