Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JavaScript implementation of a screenshot with html2canvas.js and canvas2image.js(js实现屏幕截图)

License

NotificationsYou must be signed in to change notification settings

usecodelee/JavaScript-screenshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

star this repofork this reponpmlanguagesnodeMIT Licence

中文

Introduction

JavaScript implementation screenshot,There are two libraries used:

Html2Canvas.js
Canvas2Image.js

I mainly made two demos and one NPM package:

  1. Simple Version
  2. Webpack+Vue+Element Version
  3. js-screenshot-for-npm

Simple Version Of Use

Openindex.html directly in your browser.

Webpack+Vue+Element Version Of Use

# install dependenciesnpm install# serve with hot reload at localhost:8080npm run dev# build for production with minificationnpm run build# build for production and view the bundle analyzer reportnpm 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:

js-screenshot-for-npm

npm install --save js_screen_shots

For details, see the documentREADME.md.

About

JavaScript implementation of a screenshot with html2canvas.js and canvas2image.js(js实现屏幕截图)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp