JSFiddle - React, Tailwind, and code Playground
by apoucoz
HTML
<svg id="Christmas_Lights" viewBox="0 0 612 792">
<path class="light_cord" d="M-673.8-29.1c17.3 23.7 38.1 34.3 63.6 48.8 45.4 25.7 93.4 39.1 145.4 44.4 58 6 112.1 6.2 164-9 64.2-18.8 113.7-51 113.7-51 13.3 17.3 28.1 25.3 50.1 34.5 20.3 8.5 43.8 17 66.1 23 30.1 8.1 67.1 8.4 99.1 8.3 66.5-0.1 134-3.3 197.4-17.8 30.3-6.9 76-24 89.3-32 9.3 4.7 22.4 16.1 34.7 22.8 34 18.6 73.2 33.8 111 42.8 46.1 11 93.6 5.6 137-12.8 14.4-6.1 56.6-26.1 65.7-38.5 8.8 15.1 102.8 33.1 151.5 32.5 68.4-0.8 142.2-10.5 196.7-55.9 9.7 11.9 28.3 20 42.5 25.2 35.5 12.9 76.3 22 113.9 24.9 50.2 3.9 100.3 3.9 150.1-5.3 25.6-4.7 50.6-14.2 74.4-24.8 6.7-3 36.4-14.8 43.1-20.1"/>
<path class="red_bulb bulb blink-1" d="M1351.5 76.9c-1.5-3.3-0.6-11-0.6-11 0-2.2-1.2-4-3.4-4h-7.1c-2.2 0-3.4 1.8-3.4 4 0 0 0.7 7.5-0.6 11 -1.2 3.5-6.2 7.8-6.2 13.4 0 8.9 6.2 16.1 13.7 16.1 7.6 0 13.7-7.2 13.7-16.1C1357.7 84.7 1353 80.2 1351.5 76.9z"/>
<path class="light_fixture" d="M1351.9 71.4c0 0.5-0.4 1-1 1h-14.1c-0.5 0-1-0.5-1-1l0.5-14.9c0-0.5 0.5-1 1-1h12.9c0.5 0 1 0.5 1 1L1351.9 71.4z"/>
<path class="light_fixture" d="M1343.1 57.9c-0.5-0.2-0.7-0.8-0.5-1.3l0 0c0.2-0.5 0.3-0.9 0.3-1.3l0 0c0-1.5-1.4-2.7-2.2-3.6l0 0c-0.5-0.6-0.7-1.5-0.8-2.4l0 0c-0.1-1.5 1-3.4 3.3-3.6l0 0 0.1 0 0.1 0c1.2 0 2.2 0.3 2.9 1l0 0c0.7 0.6 1 1.5 1 2.3l0 0c0 1.3-0.6 2.4-1.2 3.4l0 0c-0.4 0.6-0.9 1.1-1.4 1.5l0 0c0.2 0.5 0.3 1 0.3 1.5l0 0c0 0.6-0.1 1.3-0.4 2.1l0 0h0c-0.2 0.4-0.5 0.6-0.9 0.6l0 0C1343.4 58 1343.2 57.9 1343.1 57.9L1343.1 57.9zM1341.8 49.3c0 0.5 0.2 1.1 0.3 1.2l0 0c0.2 0.3 0.8 0.8 1.4 1.6l0 0c0.2-0.2 0.5-0.5 0.8-0.9l0 0c0.5-0.7 0.9-1.7 0.9-2.3l0 0c-0.1-0.7 0-1-1.9-1.2l0 0C1342 47.9 1341.9 48.5 1341.8 49.3L1341.8 49.3z"/>
<path class="green_bulb blink-2 bulb" d="M1265.6 90.3c-1.5-3.3-0.6-11-0.6-11 0-2.2-1.2-4-3.4-4h-7.1c-2.2 0-3.4 1.8-3.4 4 0 0 0.7 7.5-0.6 11 -1.2 3.5-6.2 7.8-6.2 13.4 0 8.9 6.2 16.1 13.7 16.1 7.6 0 13.7-7.2 13.7-16.1C1271.8 98.1 1267.2 93.6 1265.6 90.3z"/>
<path...
CSS
#Christmas_Lights {
height: 100%;
margin: 0;
position: absolute;
width: 100%;
z-index: 1000
}
.light_cord {
fill: none;
stroke: #174700;
}
.light_fixture {
fill: #134413;
}
.red_bulb {
fill: #CA2128;
stroke: #6D6D6D;
stroke-miterlimit: 10;
}
.green_bulb {
fill: #2D754A;
stroke: #6D6D6D;
stroke-miterlimit: 10;
}
.blue_bulb {
fill: #2C3EA8;
stroke: #6D6D6D;
stroke-miterlimit: 10;
}
.white_bulb {
fill: #F5EED7;
stroke: #6D6D6D;
stroke-miterlimit: 10;
}
.gold_bulb {
fill: #ffcc5e;
stroke: #6D6D6D;
stroke-miterlimit: 10;
}
/* Simply changing the opacity of the SVG fill to create the glow effect for the bulbs */
.bulb {
-webkit-animation-duration: 0.5s;
-webkit-animation-name: glow;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-direction: alternate;
animation-name: glow;
animation-duration: 0.5s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
animation-direction: alternate;
}
@-webkit-keyframes glow {
0% {
fill-opacity: 0.25;
}
100% {
fill-opacity: 1
}
}
@keyframes glow {
0% {
fill-opacity: 0.25;
}
100% {
fill-opacity: 1.0
}
}
/* Made a set of ten animation delays to create a more random effect of lights blinking. Simplest way without jumping through SVG hoops. */
.blink-1 {
-webkit-animation-delay: 0.6s;
animation-delay: 0.6s;
}
.blink-2 {
-webkit-animation-delay: 2s;
animation-delay: 2s;
}
.blink-3 {
-webkit-animation-delay: 2s;
animation-delay: 2s;
}
.blink-4 {
-webkit-animation-delay: 6s;
animation-delay: 6s;
}
.blink-5 {
-webkit-animation-delay: 2.5s;
animation-delay: 2.5s;
}
.blink-6 {
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
.blink-7 {
-webkit-animation-delay: 2s;
animation-delay: 2s;
}
.blink-8 {
-webkit-animation-delay: .2s;
animation-delay: .2s;
}
.blink-9 {
-webkit-animation-delay: 0.95s;
...