html2canvas 问题总结

1、使用最新版本1.0.0-alpha.9 旧版本的问题比较多
2、不能使用transform:,否则位置会有偏移(html2canvas不支持transform)
3、居中布局也会发生偏移

display:flex;
justify-content: center;
align-items: center;

4、可以使用定位

position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;

5、服务器地址的图片,不成功,allowTaint: true 进行配置即可;
6、1.0.0-rc.7 图片问题

posted @ 2021-03-31 19:46  Running00  阅读(635)  评论(0编辑  收藏  举报