-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbubble-pulse.html
101 lines (91 loc) · 1.91 KB
/
bubble-pulse.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Stackoverflow bubble animation</title>
<style type="text/css">
@keyframes help-bubble-pulse {
0% {
transform: scale(1);
opacity: .75
}
25% {
transform: scale(1);
opacity: .75
}
100% {
transform: scale(2.5);
opacity: 0
}
}
.help-bubble {
display: block;
position: absolute;
z-index: 2;
cursor: pointer;
/* debug */
top: calc(50% - 6px);
left: calc(50% - 6px);
}
.help-bubble:hover:after {
background-color: #0095ff
}
.help-bubble:after {
content: "";
background-color: #3af;
width: 12px;
height: 12px;
border-radius: 50%;
position: absolute;
display: block;
top: 1px;
left: 1px
}
.help-bubble .help-bubble-outer-dot {
margin: 1px;
display: block;
text-align: center;
opacity: 1;
background-color: rgba(0,149,255,0.4);
width: 12px;
height: 12px;
border-radius: 50%;
animation: help-bubble-pulse 1.5s linear infinite
}
.help-bubble .help-bubble-inner-dot {
background-position: absolute;
display: block;
text-align: center;
opacity: 1;
background-color: rgba(0,149,255,0.4);
width: 12px;
height: 12px;
border-radius: 50%;
animation: help-bubble-pulse 1.5s linear infinite
}
.help-bubble .help-bubble-inner-dot:after {
content: "";
background-position: absolute;
display: block;
text-align: center;
opacity: 1;
background-color: rgba(0,149,255,0.4);
width: 12px;
height: 12px;
border-radius: 50%;
animation: help-bubble-pulse 1.5s linear infinite
}
</style>
</head>
<body>
<h1>Comes from <a href="http://stackoverflow.com/documentation">stackoverflow documentation</a></h1>
<!-- inner scale is based on outer scale, so that child dom will scale faster. -->
<div class="help-bubble">
<div class="help-bubble-outer-dot">
<div class="help-bubble-inner-dot">
</div>
</div>
</div>
</body>
</html>