首页 > Web开发 > 详细

html2canvas 问题总结

时间:2021-04-01 00:46:03      阅读:19      评论:0      收藏:0      [点我收藏+]

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 进行配置即可;

html2canvas 问题总结

原文:https://www.cnblogs.com/Running00/p/14603424.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!