-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo3.html
80 lines (69 loc) · 1.06 KB
/
demo3.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<style>
*{
margin: 0;
padding: 0;
}
#blur-wrap{
position: relative;
width: 320px;
height: 520px;
margin:0 auto;
top: 0;
left: 0;
bottom: 0;
right: 0;.
}
#blur-img{
position: absolute;
left:0;
top:0;
z-index: 0;
}
#blur-canvas{
position: absolute;
left:0;
top:0;
z-index: 100;
}
#reset{
position: absolute;
left:40px;
bottom: -80px;
background: #1165cd;
}
#mosaic{
position: absolute;
right:50px;
bottom: -80px;
background: #5d61cc;
}
#reset:hover,#show:hover{
background: #9861cc;
}
button{
width: 70px;
height: 30px;
line-height: 30px;
border-radius: 10px;
border: none;
color: white;
outline: none;
}
button:hover{
cursor: pointer;
}
</style>
<body>
<div id="blur-wrap">
<canvas id="blur-canvas">
Your browser does not support the HTML5 canvas tag.
</canvas>
<button id="reset" onclick="reset()">复原</button>
<button id="mosaic" onclick="mosaic(0,0,320,510)">马赛克</button>
</div>
<script src="jquery.js"></script>
<script src="demo3.js"></script>
</body>
</html>