<div class="kitt">
<div class="light"></div>
<div class="light"></div>
<div class="light"></div>
<div class="light"></div>
<div class="light"></div>
<div class="light"></div>
<div class="light"></div>
<div class="light"></div>
</div>
body {
background-color: #000;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.kitt {
position: relative;
display: flex;
.light {
position: relative;
width: 30px;
height: 15px;
background-color: #f00;
margin-right: 1px;
transform: scale(0);
transform-origin: center center;
box-shadow: 0 0 30px 0 rgba(#f00, 0.5);
display: flex;
align-items: center;
justify-content: center;
animation: kitts-lights 1s infinite cubic-bezier(0.770, 0.000, 0.175, 1.000);
@for $i from 1 through 8 {
&:nth-child(#{$i}) {
animation-delay: $i * 0.075 + s;
}
}
}
}
@keyframes kitts-lights {
0% { background-color: #f00; transform: translate3d(0, 0,0) scale(0.2, 0.4); opacity: 0.1; border-radius: 50%; box-shadow: 0 0 30px 0 rgba(#f04, 0); }
20% { background-color: #f00; transform: translate3d(0, 0,0) scale(0.2, 0.4); opacity: 0.25; border-radius: 50%; box-shadow: 0 0 30px 0 rgba(#f04, 0.5); }
60% { background-color: #f00; transform: translate3d(0, 0,0) scale(1, 1); opacity: 1; border-radius: 10%; box-shadow: 0 0 30px 0 rgba(#f04, 1); }
100% { background-color: #f00; transform: translate3d(0, 0,0) scale(0.2, 0.4); opacity: 0.1; border-radius: 50%; box-shadow: 0 0 30px 0 rgba(#f04, 0); }
}
View Compiled
var theme = new Howl({
src: ['https://s3-us-west-2.amazonaws.com/s.cdpn.io/596723/knight-rider.mp3'],
loop: true
});
theme.play();
This Pen doesn't use any external CSS resources.