JSFiddle - React, Tailwind, and code Playground
HTML
<div class="row" id="rowek">
<div class="col-md-12 rowek-bgr">
<div class="col-md-2 child">
<span class="child-txt">Test</span> <span class="child-special-txt">for adults</span>
</div>
<div class="col-md-2 child">
<span class="child-txt">Test</span> <span class="child-special-txt">for childrens</span>
</div>
<div class="col-md-2 child">
<span class="child-txt">Test</span> <span class="child-special-txt">for students</span>
</div>
<div class="col-md-2 child">
<span class="child-txt">Test</span> <span class="child-special-txt">for grands</span>
</div>
</div>
</div>
<div id="follower">
<div id="circle1"></div>
<div id="circle2"></div>
</div>
CSS
.rowek-bgr {
background-color: #313343;
display: flex;
justify-content: center;
}
.child {
padding: 15px;
width: auto!important;
}
.child-txt {
font-size: 18px;
font-weight: 300;
text-transform: uppercase;
color: white;
}
.child-special-txt {
font-size: 18px;
font-weight: 800;
text-transform: uppercase;
color: white;
}
#follower {
position: absolute;
top: 50%;
left: 50%;
display: none;
}
#follower #circle1 {
position: absolute;
-webkit-animation: pulse 2s infinite; /* Chrome, Safari, Opera */
animation: pulse 2s infinite;
background: #fff;
border-radius: 50%;
height: 0em;
width: 0em;
margin-top: 0em;
margin-left: 0em;
}
#follower #circle2 {
position: absolute;
-webkit-animation: pulse 4s infinite; /* Chrome, Safari, Opera */
animation: pulse 4s infinite;
background: rgba(200,0,0,0.8);
border-radius: 50%;
height: 0em;
width: 0em;
margin-top: 0em;
margin-left: 0em;
}
@-moz-keyframes pulse {
0% {
opacity: 0.2;
height: 1em;
width: 1em;
margin-top: -0.5em;
margin-left: -0.5em;
}
50% {
opacity: 0.9;
height: 3em;
width: 3em;
margin-top: -1.5em;
margin-left: -1.5em;
}
100% {
opacity: 0.2;
height: 1em;
width: 1em;
margin-top: -0.5em;
margin-left: -0.5em;
}
}
@-webkit-keyframes pulse {
0% {
opacity: 0.2;
height: 1em;
width: 1em;
margin-top: -0.5em;
margin-left: -0.5em;
}
50% {
opacity: 0.9;
height: 3em;
width: 3em;
margin-top: -1.5em;
margin-left: -1.5em;
}
100% {
opacity: 0.2;
height: 1em;
width: 1em;
margin-top: -0.5em;
margin-left: -0.5em;
}
}
@-o-keyframes pulse {
0% {
opacity: 0.2;
height: 1em;
width: 1em;
margin-top: -0.5em;
margin-left: -0.5em;
}
50% {
opacity: 0.9;
height: 3em;
width: 3em;
margin-top: -1.5em;
margin-left: -1.5em;
}
100% {
opacity: 0.2;
height: 1em;
width: 1em;
margin-top: -0.5em;
...
JavaScript
$(document).mousemove(function(e) {
if (e.pageY < 55) {
$('#follower').offset({
left: e.pageX,
top: e.pageY
}).show();
} else {
$('#follower').hide();
}
});