🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## **使用示例** > 参考文档:[http://html2canvas.hertzen.com/](http://html2canvas.hertzen.com/) > 版本:1.0.0-rc.5 > 代码案例来自:[http://html2canvas.hertzen.com/](http://html2canvas.hertzen.com/) ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>html2canvas</title> <script src="../original/Every.js" type="text/javascript" charset="utf-8"></script> <script src="../original/Require.js" type="text/javascript" charset="utf-8"></script> </head> <body> <div id="capture" style="padding: 10px; background: #f5da55"> <h4 style="color: #000; ">Hello world!</h4> </div> <script type="text/javascript"> Every.use(['html2canvas'],function(html2canvas){ html2canvas(document.querySelector("#capture")).then(canvas => { document.body.appendChild(canvas) }); }); </script> </body> </html> ```