html2canvas问题与图标

问题描述 投票:0回答:1

您好我试图在html2canvas.enter image description here的帮助下打印带有一些图标的div列表

看上面是我输入的图像。 enter image description here

但我得到了这个输出。请帮助我,如果有的话

    .icon-circle:before {
      content: "\e941";
    }
<div style="position: relative; border-bottom: 1px solid #cecece; display: table-cell; vertical-align: middle; width: 85px; padding:5px 0;"> 
  <i class="icon-circle" style="color:"blue">
     <span style="color: white;font-size: 18px;position: absolute; top: 22px;left: 13px;"> T
     </span>
   </i>
</div>

有任何解决方案

javascript html twitter-bootstrap html2canvas
1个回答
1
投票

最后在html2canvas的新版本1.1中,我得到了解决方案#1001

这是fiddle

window.takeScreenShot = function() {
    html2canvas(document.getElementById("target"), {
        width:320,
        height:220
    }).then(function (canvas) {
       document.body.appendChild(canvas);
   });
}
© www.soinside.com 2019 - 2024. All rights reserved.