使用html2canvas时,导出图片背景不是透明色

2022-03-16  本文已影响0人  羊驼626

问题原因:

const options = {
  backgroundColor: null // null或transparent可将canvas背景设置为透明
}
html2canvas(dom, options).then(canvas => {
        const base64 = canvas.toDataURL('image/png')
      })
上一篇 下一篇

猜你喜欢

热点阅读