JSFiddle - React, Tailwind, and code Playground
by c_vilander
HTML
<div class="text"><p>Loading</p></div>
<div class="light"></div>
<div class="light two"></div>
<!
CSS
body {
background: #000;
margin: 0;
padding: 0;
font-size: 76px;
}
p {
margin: 0;
padding: 0;
}
.text {
position: absolute;
top: 55px;
left: 200px;
margin: 0;
padding: 0;
color: #000;
background: transparent;
z-index: 1;
text-shadow: 0px 10px 10px #000;
-webkit-animation: shadow 5.0s ease-in-out infinite;
animation: shadow 5.0s ease-in-out infinite;
}
.light {
position: absolute;
top: 45px;
left: 150px;
width: 110px;
height: 110px;
margin: 0;
padding: 0;
z-index: 0;
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0.2)));
background: -webkit-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(255,255,255,0.2) 100%);
background: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%,rgba(255,255,255,0.2) 100%);
box-shadow: 0px 0px 40px rgba(255,255,255,1);
opacity: 0.7;
border-radius: 100px;
-webkit-transform: translate3d(0,0,0);
-webkit-animation: light 5.0s ease-in-out infinite;
animation: light 5.0s ease-in-out infinite;
}
.light.two {
z-index: 2;
opacity: 0.6;
}
@-webkit-keyframes light {
0% { left: 160px; }
50% { left: 370px; }
100% { left: 160px; }
}
@keyframes light {
0% { left: 160px; }
50% { left: 370px; }
100% { left: 160px; }
}
@-webkit-keyframes shadow {
0% { text-shadow: -7px 2px 7px #000; }
50% { text-shadow: 7px 2px 7px #000; }
100% { text-shadow: -7px 2px 7px #000; }
}
@keyframes shadow {
0% { text-shadow: -5px 2px 5px #000; }
50% { text-shadow: 7px 2px 5px #000; }
100% { text-shadow: -7px 2px 5px #000; }
}