diff --git a/前端/前端通过页面(dom)生成图片并放大倍数.md b/前端/前端通过页面(dom)生成图片并放大倍数.md index bfe380c..6f6310e 100644 --- a/前端/前端通过页面(dom)生成图片并放大倍数.md +++ b/前端/前端通过页面(dom)生成图片并放大倍数.md @@ -1,3 +1,4 @@ +### 代码 ``` var canvas2 = document.createElement("canvas"); var _canvas = document.getElementById('app'); @@ -20,7 +21,7 @@ console.log(canvas2.style.width) background: null, windowWidth:document.body.scrollWidth, windowHeight:document.body.scrollHeight, - x:(document.body.scrollWidth - width) / 2, + x:0, y:0 }).then(canvas => { let imgUrl = `` @@ -31,4 +32,5 @@ console.log(canvas2.style.width) }); } }) -``` \ No newline at end of file +``` +html2canvas \ No newline at end of file