-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoo.html
104 lines (101 loc) · 3.13 KB
/
goo.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"/>
<style>
.blobs{
filter:url('#goo');
}
.blob{
left:0;
top:0;
width:100px;
height:100px;
display:flex !important;
transform: none !important;
align-items:center;
border-radius: 50%;
justify-content:center;
color:white;
font-size:48px;
cursor:pointer;
background:#ff00ff;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}
/*.blob:first-child {
background:#ff00ff;
}
.blob:nth-child(2) {
background:limegreen;
}
.blob:nth-child(3) {
background:#5677fc;
}*/
</style>
</head>
<body>
<div class="blobs">
<div
class="blob">
<i class="ion-close"></i>
</div>
<div
class="blob">
<i class="ion-planet"></i>
</div>
<div
class="blob">
<i class="ion-log-in"></i>
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="goo">
<feGaussianBlur
in="SourceGraphic"
stdDeviation="20"
result="blur" />
<feColorMatrix
in="blur"
mode="matrix"
result="goo"
values="1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 18 -7" />
<!--<feBlend in="SourceGraphic" in2="goo" />-->
<feComposite in="SourceGraphic" in2="goo" operator="atop"/>
</filter>
</defs>
</svg>
</body>
<script type="text/javascript" src="./node_modules/draggable/dist/draggable.min.js"></script>
<script type="text/javascript">
var blobs = document.getElementsByClassName("blob"),
l = blobs.length;
for(var i=0; i<l; i++) {
var blob = blobs[i];
new Draggable (blob);
}
function show() {
for(var i=0; i<l; i++) {
var blob = blobs[i];
blob.style.left = 100 * i + 'px';
}
}
function hide() {
for(var i=0; i<l; i++) {
var blob = blobs[i];
blob.style.left = 0;
blob.style.top = 0;
}
}
function expand() {
for(var i=0; i<l; i++) {
var blob = blobs[i];
blob.style.left = 150 * i + 'px';
}
}
</script>
</html>