-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
63 lines (49 loc) · 2.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<title>img editor by jfy</title>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style type="text/css">
*{margin:0; padding:0;}
.wrapper{width:100vw; height:100vh;overflow: hidden; display: none; position:absolute;left:0; top:0;background:#000;
z-index: 10}
.my-button{line-height: 30px; border-radius: 2px; background:#fff;}
.buttons{position:fixed; bottom:50px; right:50px; z-index:100;}
.img-editor{text-align: center; padding-top: 20px;}
.img-wrapper{
display: inline-block; width:260px; height:260px; border-radius: 50%; overflow:hidden;
}
.img-wraper img{width:100%;}
#imgPicker{display: none;}
.card{display: inline-block;}
.card img{width:100%;}
</style>
</head>
<body>
<div class='img-editor'>
<div class="card" style="width: 30rem; max-width:90%;">
<img id='showImg' class="card-img-top" src="" alt="Choose a pic to edit">
<div class="card-body">
<h5 class="card-title">Please choose a pic to edit :)</h5>
<!-- <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> -->
<a href="#" class="btn btn-primary" id="choosePic">选择图片</a>
<input type='file' id='imgPicker'/>
</div>
</div>
</div>
<div class='wrapper'>
<div class='buttons'>
<input type='button' class="btn btn-primary" value='保存' id='save'/>
<input type='button' class="btn btn-primary" value='顺时针旋转90度' id='rotate90'/>
<input type='button' class="btn btn-primary" value='原始比例' id='scaleToOrigin'/>
<input type='button' class="btn btn-primary" value='取消' id='cancel'/>
</div>
</div>
<script type="text/javascript" src="./assets/js/AlloyFinger.min.js"></script>
<script type="text/javascript" src="./assets/js/JImageEditor.min.js"></script>
<!-- <script type="text/javascript" src="./js/JImageBrowser.min.js"></script> -->
<script type="text/javascript" src="./assets/js/main.min.js"></script>
</body>
</html>