Looking for help implementing that little blue dot as seen on Stacks new Documentation site, it's perfect for animating a dashboard I'm building that shows service health/metrics. I grabbed html/css using Chrome's inspector, but I'm terrible at this stuff, I can't even get a dot, much less a blue one that glows ;-D
/
.help-bubble:after {
content: "";
background-color: #3af;
width: 12px;
height: 12px;
border-radius: 50%;
position: absolute;
display: block;
top: 1px;
left: 1px;
}
<span class="help-bubble-outer-dot">
<span class="help-bubble-inner-dot"></span>
</span>
Looking for help implementing that little blue dot as seen on Stacks new Documentation site, it's perfect for animating a dashboard I'm building that shows service health/metrics. I grabbed html/css using Chrome's inspector, but I'm terrible at this stuff, I can't even get a dot, much less a blue one that glows ;-D
https://jsfiddle/raffinyc/3trup2c1/
.help-bubble:after {
content: "";
background-color: #3af;
width: 12px;
height: 12px;
border-radius: 50%;
position: absolute;
display: block;
top: 1px;
left: 1px;
}
<span class="help-bubble-outer-dot">
<span class="help-bubble-inner-dot"></span>
</span>
Share
edited Sep 16, 2017 at 15:37
Panda
6,8946 gold badges44 silver badges59 bronze badges
asked Jul 23, 2016 at 1:55
raffianraffian
32.1k26 gold badges106 silver badges184 bronze badges
3
- 1 you can look into this: codepen.io/nickpettit/pen/vacDI – tagh Commented Jul 23, 2016 at 1:58
- That's perfect, exactly what I'm looking for, thx – raffian Commented Jul 23, 2016 at 2:05
- another example in here jsfiddle/dH6LS/1667 if you need more help, I can help you. – Cem Arguvanlı Commented Jul 23, 2016 at 2:12
2 Answers
Reset to default 9Here's the full reproduction. The animation makes liberal use of pseudoelements. The CSS:
.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 {
display: block;
position: absolute;
z-index: 2;
cursor: pointer;
left: 40px;
top: 40px;
}
.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-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%;
-webkit-animation: help-bubble-pulse 1.5s linear infinite;
-moz-animation: help-bubble-pulse 1.5s linear infinite;
-o-animation: help-bubble-pulse 1.5s linear infinite;
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%;
-webkit-animation: help-bubble-pulse 1.5s linear infinite;
-moz-animation: help-bubble-pulse 1.5s linear infinite;
-o-animation: help-bubble-pulse 1.5s linear infinite;
animation: help-bubble-pulse 1.5s linear infinite;
}
@keyframes help-bubble-pulse{
0% {
transform: scale(1);
opacity: .75;
}
25% {
transform:scale(1);
opacity:.75;
}
100% {
transform:scale(2.5);
opacity:0
}
}
For the record, I'm not very well versed in code intellectual property but it's unlikely you have the rights to use this exactly without somehow making it your own.
Try box-shadow
:
-webkit-box-shadow: 0px 0px 20px 0px rgba(0,225,255,1);
-moz-box-shadow: 0px 0px 20px 0px rgba(0,225,255,1);
box-shadow: 0px 0px 20px 0px rgba(0,225,255,1);
The syntax is:
0px (horizontal offset) 0px (vertical offset) 20px (bur value) 0px (spread value) rgba (color value)
See here for more information:
https://css-tricks./snippets/css/css-box-shadow/