-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
67 lines (62 loc) · 2.05 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
64
65
66
67
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta id="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no,minimal-ui" name="viewport">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no">
<title>Explosion Demo</title>
<style>
#target {
display: block;
margin: auto;
margin-top: 100px;
margin-bottom: 10px;
width: 277px;
border-radius: 50px;
}
#github {
position: absolute;
top: 0;
left: 0;
width: 138px;
height: 138px;
display: block;
background: transparent url(./fork.png) 0 0 no-repeat;
text-indent: -9000px;
z-index: 3;
}
</style>
</head>
<body style="margin:0;text-align:center;">
<a id="github" target="_blank" href="https://github.com/blackmiaool/jquery-image-explode"></a>
<img id="target" src="./demo.jpg" />
<button style="position:fixed;right:0;top:0;width:100px;height:50px;" onclick="explode()">Explode</button>
<script src="lib/jquery-3.1.0.js"></script>
<!--<script src="lib/zepto1.2.0.js"></script>-->
<!--<script src="jquery.imgexplode.js"></script>-->
<script src="dist/jquery.imgexplode.min.js"></script>
<script>
var $target = $("#target");
function explode() {
$target.explodeRestore();
setTimeout(function () {
$target.explode({
maxWidth: 15,
minWidth: 5,
radius: 231,
release: false,
recycle: false,
explodeTime: 320,
canvas: true,
round: false,
maxAngle: 360,
gravity: 10,
groundDistance: 150,
});
}, 300)
}
explode();
</script>
</body>
</html>