JavaScript implementation of a
JavaScript-screenshot
中文
IntroductionJavaScript implementation screenshot,There are two libraries used:
Html2Canvas.js
Canvas2Image.js
I mainly made two demos and one NPM package:
Simple Version Webpack+Vue+Element Version js-screenshot-for-npm Simple Version Of UseWebpack+Vue+Element Version Of UseOpen
index.html
directly in your browser.
# install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report Example
The original html is like this:
This is the element node:
This is after converting to canvas:
This is the element node:
This is after converting to img:
This is the element node:
This is the final result:
npm install --save js_screen_shots
For details, see the document README.md.
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。