Bootstrap

html2canvas使用方法

html代码,简化后如下

<div class="postersbox">
			<div class="postersbg" id="postersbg">
				内容块
		</div>
</div>

js

html2canvas(document.querySelector("#postersbg")).then(canvas => {
    document.body.appendChild(canvas)
});

html2canvas.js点击这里下载

;