html2canvas偏移
时间: 2023-09-25 14:14:59 浏览: 86
html2canvas
4星 · 用户满意度95%
html2canvas在绘制完图片后可能会出现偏移的问题。一个解决办法是设置scrollY和scrollX参数为0,以便消除偏移。然而,有时候即使设置了这两个参数,仍然无法解决偏移的问题。这可能是因为绘制的元素上应用了transform:translateX(-50%)样式,导致了偏移的发生。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [html2canvas生成的图片偏移不完整](https://blog.csdn.net/qq_35430000/article/details/124190286)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [Html2Canvas 常见问题](https://blog.csdn.net/lunhui1994_/article/details/119179726)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文