<div class="container">
<div class="hotspot pulse-dot">
<div class="pulse-ring">
</div>
</div>
</div>
body{
background: #333;
}
.container{
position: absolute;
width: 100%;
height: 100%;
}
.hotspot {
position: absolute;
background: #FFF;
background: rgba(255,255,255,0.75);
width: 32px;
height: 32px;
border-radius: 50%;
left: 50%;
top: 50%;
/*correct centered position...*/
transform: translateX(-16px) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
.pulse-dot{
animation: pulse-dot infinite 3.5s;
}
.pulse-ring {
content: '';
width: 32px;
height: 32px;
border: 8px solid #FFF;
border-radius: 50%;
position: absolute;
top: -8px;
left: -8px;
animation: pulse-ring infinite 3.5s;
}
/* Animations */
@-webkit-keyframes pulse-dot {
0% {
transform: scale(1, 1);
}
30%{
transform: scale(1.25, 1.25);
}
100% {
transform: scale(1, 1);
}
}
@keyframes pulse-dot {
0% {
transform: scale(1, 1);
}
30%{
transform: scale(1.25, 1.25);
}
100% {
transform: scale(1, 1);
}
}
@-webkit-keyframes pulse-ring {
0% {
transform: scale(1, 1);
opacity: 0;
}
25%{
opacity: .5;
}
100% {
transform: scale(1.8, 1.8);
opacity: 0;
}
}
@keyframes pulse-ring {
0% {
transform: scale(1, 1);
opacity: 0;
}
25%{
opacity: .5;
}
100% {
transform: scale(1.8, 1.8);
opacity: 0;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.