KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
shear-picture
★ 22
Open GitHub ↗
裁剪图片保存为base64,可用于头像上传
Download README (.md)
Explore Similar Repositories
use-cofx
:
declarative side-effects inside react with hooks
zulu-assault
:
Trying to revive an old classic game of 1998 that I used to play a lot as a kid.
raft-kv
:
A C++ implementation of RAFT consensus algorithm based on asio
qKit
:
qKit is an open source JavaScript 2D rendering library that renders quadratic shapes (rectangles and squares).
hdtv
:
Nuclear Spectrum Analysis Tool
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
shear-picture
?
Download (.md)
# shear-picture 裁剪图片保存为base64,可用于头像上传 ## 适用平台 pc/移动端 ## 演示 [演示地址](https://github.com/caohoucheng/shear-picture/blob/master/shear-picture/image/1.gif) ## 简书介绍 [介绍](https://www.jianshu.com/p/ffc2f1dae39b) ## 使用方法 #### 1.首先加载插件,需要用到的文件有shear.picture.js和shear.picture.css文件。 ``` <!DOCTYPE html> <html> <head> ... <link rel="stylesheet" href="css/shear.picture.css"> <script src="js/shear.picture.js"></script> </head> <body> ... </body> </html> ``` #### 2.HTML内容。 ``` <div class="head-img"> <!-- 显示图片的容器 --> <img class="my-img"> <!-- 选择图片 --> <input type="file" class="selImg" accept="image/*" multiple=""> </div> ``` #### 3.调用Picture Picture(图片最大值(M),确定后的回调,取消后的回调) ``` <script> Picture(1,function(e){ //点击确定后的回调函数 console.log(e) }, function(e) { //点击取消后的回调函数 console.log(e) }) </script> ```