/*Downloaded from https://www.codeseek.co/jackley/codechallenge-december-2016-XNxzXm */
body {
background: #000;
}
.lights {
text-align: center;
white-space: nowrap;
overflow: hidden;
position: relative;
z-index: 1;
padding: 0;
pointer-events: none;
width: 320px;
height: 400px;
margin: auto;
}
.lights li {
position:absolute;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
list-style: none;
margin: 0;
padding: 0;
display: block;
width: 12px;
height: 28px;
border-radius: 50%;
margin: 20px;
display: inline-block;
background: #00f7a5;
box-shadow: 0px 4.66667px 24px 3px #00f7a5;
-webkit-animation-name: flash-1;
animation-name: flash-1;
-webkit-animation-duration: 2s;
animation-duration: 2s;
}
.lights li:nth-child(2n+1) {
background: cyan;
box-shadow: 0px 4.66667px 24px 3px rgba(0, 255, 255, 0.5);
-webkit-animation-name: flash-2;
animation-name: flash-2;
-webkit-animation-duration: 0.4s;
animation-duration: 0.4s;
}
.lights li:nth-child(4n+2) {
background: #f70094;
box-shadow: 0px 4.66667px 24px 3px #f70094;
-webkit-animation-name: flash-3;
animation-name: flash-3;
-webkit-animation-duration: 1.1s;
animation-duration: 1.1s;
}
.lights li:nth-child(odd) {
-webkit-animation-duration: 1.8s;
animation-duration: 1.8s;
}
.lights li:nth-child(3n+1) {
-webkit-animation-duration: 1.4s;
animation-duration: 1.4s;
}
.lights li:before {
content: "";
position: absolute;
background: #222;
width: 10px;
height: 9.33333px;
border-radius: 3px;
top: -4.66667px;
left: 1px;
}
.lights li:after {
content: "";
top: -14px;
left: 9px;
position: absolute;
width: 52px;
height: 18.66667px;
border-bottom: solid #222 2px;
border-radius: 50%;
}
.lights li:last-child:after {
content: none;
}
.lights li:first-child {
margin-left: -40px;
}
.lights li:nth-child(1) { bottom:0; left:0px; }
.lights li:nth-child(2) { bottom:0; left:0px; }
.lights li:nth-child(3) { bottom:0; left:55px;}
.lights li:nth-child(4) { bottom:0; left:110px;}
.lights li:nth-child(5) { bottom:0; left:165px;}
.lights li:nth-child(6) { bottom:0; left:220px;}
.lights li:nth-child(7) { bottom:0; left:275px;}
.lights li:nth-child(7)::after { transform: rotate(63deg); border-radius: 19%; top:-40px; left: -25px; }
.lights li:nth-child(8) { bottom:50px; left:27.5px;}
.lights li:nth-child(9) { bottom:50px; left:82.5px;}
.lights li:nth-child(10) { bottom:50px; left:137.5px;}
.lights li:nth-child(11) { bottom:50px; left:192.5px;}
.lights li:nth-child(12) { bottom:50px; left:247.5px;}
.lights li:nth-child(12)::after { transform: rotate(-65deg); border-radius: 19%; top:-40px; left: -235px; }
.lights li:nth-child(13) { bottom:100px; left:55px;}
.lights li:nth-child(14) { bottom:100px; left:110px;}
.lights li:nth-child(15) { bottom:100px; left:165px;}
.lights li:nth-child(16) { bottom:100px; left:220px;}
.lights li:nth-child(16)::after { transform: rotate(63deg); border-radius: 19%; top:-40px; left: -25px; }
.lights li:nth-child(17) { bottom:150px; left:82.5px;}
.lights li:nth-child(18) { bottom:150px; left:137.5px;}
.lights li:nth-child(19) { bottom:150px; left:192.5px;}
.lights li:nth-child(19)::after { transform: rotate(-65deg); border-radius: 19%; top:-40px; left: -125px; }
.lights li:nth-child(20) { bottom:200px; left:110px;}
.lights li:nth-child(21) { bottom:200px; left:165px;}
.lights li:nth-child(21)::after { transform: rotate(63deg); border-radius: 19%; top:-40px; left: -25px; }
.lights li:nth-child(22) {
bottom:250px; left:137.5px;
background: #f70094;
box-shadow: 0px 4.66667px 24px 3px #f7e300;
-webkit-animation-name: flash-4;
animation-name: flash-4;
-webkit-animation-duration: 1.5s;
animation-duration: 1.4s;
}
.lights li:nth-child(22)::after { display:none; }
@-webkit-keyframes flash-1 {
0%, 100% {
background: #00f7a5;
box-shadow: 0px 4.66667px 24px 3px #00f7a5;
}
50% {
background: rgba(0, 247, 165, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(0, 247, 165, 0.2);
}
}
@keyframes flash-1 {
0%, 100% {
background: #00f7a5;
box-shadow: 0px 4.66667px 24px 3px #00f7a5;
}
50% {
background: rgba(0, 247, 165, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(0, 247, 165, 0.2);
}
}
@-webkit-keyframes flash-2 {
0%, 100% {
background: cyan;
box-shadow: 0px 4.66667px 24px 3px cyan;
}
50% {
background: rgba(0, 255, 255, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(0, 255, 255, 0.2);
}
}
@keyframes flash-2 {
0%, 100% {
background: cyan;
box-shadow: 0px 4.66667px 24px 3px cyan;
}
50% {
background: rgba(0, 255, 255, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(0, 255, 255, 0.2);
}
}
@-webkit-keyframes flash-3 {
0%, 100% {
background: #f70094;
box-shadow: 0px 4.66667px 24px 3px #f70094;
}
50% {
background: rgba(247, 0, 148, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(247, 0, 148, 0.2);
}
}
@keyframes flash-3 {
0%, 100% {
background: #f70094;
box-shadow: 0px 4.66667px 24px 3px #f70094;
}
50% {
background: rgba(247, 0, 148, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(247, 0, 148, 0.2);
}
}
@-webkit-keyframes flash-4 {
0%, 100% {
background: #f7e300;
box-shadow: 0px 4.66667px 24px 3px #f7e300;
}
50% {
background: rgba(247,227,0, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(247,227,0, 0.4);
}
}
@keyframes flash-4 {
0%, 100% {
background: #f7e300;
box-shadow: 0px 4.66667px 24px 3px #f7e300;
}
50% {
background: rgba(247,227,0, 0.4);
box-shadow: 0px 4.66667px 24px 3px rgba(247,227,0, 0.2);
}
}