Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <!DOCTYPE html>
<html>

<head>
	<title>Christmas Multiple String Lights</title>

</head>

<body>
	<h1>Merry Christmas</h1>

	<ul class="string1">
		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>
		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>
		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>
		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>
		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>
		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>
		<li></li>		<li></li>		<li></li>		<li></li>		<li></li>	
    </ul> 

<ul class="string2">
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
</ul>

<ul class="string3">
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>	<li></li>
</ul>
</body>

</html>
              
            
!

CSS

              
                body {
    background: #0080ff;   /* or #333 */
  color: white;
  font-family: arial;
}

/* ##### Title ##### */
h1{
    position: relative;
    text-align: center;
    font-family: verdana, arial;
    text-transform: uppercase;
    font-size: 3em;
    letter-spacing: 4px;
    overflow: hidden;
    background: linear-gradient(90deg, #DC143C, #fff, #00b300);
    background-repeat: no-repeat;
    background-size: 80%;
    animation: animate 12s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: rgba(255, 255, 255, 0);
}

@keyframes animate {
  0% {
    background-position: -500%;
  }
  100% {
    background-position: 500%;
  }
}

/* ##############################################
Lights 1 
####### */

.string1 {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    top: 40px;
    z-index: 1;
    margin: -15px 70px 0 0;
    padding: 0 0 0 0;
    pointer-events: none;
    width: 100%;
}

.string1 li {
    position: relative;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-iteration-count: infinite;
    animation-interation-count: infinite;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 12px;
    height: 28px;
    border-radius: 50%;
    margin: 20px;
    display: inline-block;
    background: #f02241;
    box-shadow: 0px 4.66667px 24px 3pxrgba(255,230,65,1);
    -webkit-animation-name: blinker1;
    animation-name: blinker1;
    -webkit-animation-duration: 2s;
    animation-duration: 2s;
}

.string1 li:nth-child(2n+1) {
    background: #E5C100;
    box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65,1);
    -webkit-animation-name: blinker2;
    animation-name: blinker2;
    -webkit-animation-duration: 2.5s;
    animation-duration: 2.5s;
}

.string1 li:nth-child(4n+2) {
    background: #0000ff;
    box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65,1);
    -webkit-animation-name: blinker3;
    animation-name: blinker3;
    -webkit-animation-duration: 2.5s;
    animation-duration: 2.5s;
}

.string1 li:nth-child(odd) {
    -webkit-animation-duration: 2.8s;
    animation-duration: 2.8s;
}

.string1 li:nth-child(3n+1) {
    -webkit-animation: 2.4s;
    animation-duration: 2.4s;
}

.string1 li:before {
    content: "";
    position: absolute;
    background: #222;
    width: 10px;
    height: 9.33333px;
    border-radius: 3px;
    top: -4.66667px;
    left: 1px;
}

.string1 li:after {
    content: "";
    top: -14px;
    left: 9px;
    position: absolute;
    width: 52px;
    height: 18.66667px;
    border-bottom: solid #222 2px;
    border-radius: 50%;
}

.string1 li:last-child:after {
    content: none;
}

.string1 li:first-child {
    margin-left: 40px;
}

@-webkit-keyframes blinker1 {

    0%,
    100% {
        background: #f02241;
        box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65,1);
    }

    50% {
        background: rgba(240, 34, 65, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65,1);
    }
}

@keyframes blinker1 {

    0%,
    100% {
        background: #f02241;
        box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65,1);
    }

    50% {
        background: rgba(240, 34, 65, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(240, 35, 65, 0.2);
    }
}

@-webkit-keyframes blinker2 {

    0,
    100% {
        background: #42b261;
        box-shadow: 0px 4.66667px 24px 3px #42b261;
    }

    50% {
        background: rgba(66, 178, 97, 0.4);
        box-shadow: 0px 4.6667px 24px 3px rgba(66, 178, 97, 0.2);
    }
}

@keyframes blinker2 {

    0%,
    100% {
        background: #e0e0e0;
        box-shadow: 0px 4.66667px 24px 3px #bababa;
    }

    50% {
        background: rgba(224, 224, 224, 0.4);
        box-shadow: 0px 4.66667px 24px 3px #2c0553;
    }
}

@-webkit-keyframes blinker3 {

    0%,
    100% {
        background: rgba(65, 105, 225, 1);
        box-shadow: 0px 4.6667px 24px 3px rgba(233, 212, 96, 1);
    }

    50% {
        background: rgba(	0, 0, 216, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(66, 178, 97, 0.2);
    }

    @keyframes blinker3 {

        0%,
        100% {
            background: #F9FBEE;
            box-shadow: 0px 4.66667px 24px 3px #F9FBEE;
        }

        50% {
            background: rgba(249, 251, 238, 0.4);
            box-shadow: 0px 4.66667px 24px 3px rgba(249, 251, 238, 0.2);
        }
    }
}

/* ############################################## 
Lights 2 non blinking
########### */

.string2 {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    top: 40px;
    z-index: 1;
    margin: -15px 70px 0 0;
    padding: 0 0 0 0;
    pointer-events: none;
    width: 100%;
}

.string2 li {
    position: relative;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-iteration-count: infinite;
    animation-interation-count: infinite;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 12px;
    height: 28px;
    border-radius: 50%;
    margin: 40px;  /* space between bulbs */
    display: inline-block;
    background: #ffffff;
    box-shadow: 0px 4.66667px 24px 3px rgba(255,255,255, 1);
    -webkit-animation-name: blinker1a;
    animation-name: blinker1a;
    /*-webkit-animation-duration: 2.7s;
    animation-duration: 2.7s;*/
}

.string2 li:nth-child(2n+1) {
    background: #8A2BE2;
    box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65, 1);
    -webkit-animation-name: blinker2a;
    animation-name: blinker2a;
    /*-webkit-animation-duration: 2.4s;
    animation-duration: 2.4s;*/
}

.string2 li:nth-child(4n+2) {
    background:#ff9000;
    box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65, 1);
    -webkit-animation-name: blinker3a;
    animation-name: blinker3a;
    /*-webkit-animation-duration: 2.5s;
    animation-duration: 2.5s;*/
}

.string2 li:nth-child(odd) {
   /* -webkit-animation-duration: 2.8s;
    animation-duration: 2.8s;*/
}

.string2 li:nth-child(3n+1) {
    -webkit-animation: 2.4s;
    animation-duration: 2.4s;
}

.string2 li:before {
    content: "";
    position: absolute;
    background: #292929; /* string */
    width: 10px;
    height: 9.33333px;
    border-radius: 3px;
    top: -4.66667px;
    left: 1px;
}

.string2 li:after {
    content: "";
    top: -14px;
    left: 9px;
    position: absolute;
    width: 87px;  /*  length of string */
    height: 24.66667px; /* arc of string */
    border-bottom: solid #222 2px;
    border-radius: 50%;
}

.string2 li:last-child:after {
    content: none;
}

.string2 li:first-child {
    margin-left: 40px;
}

@-webkit-keyframes blinker1a {

    0%,
    100% {
        background: #ffffff;
        box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65, 1);
    }

    50% {
        background: rgba(230, 230, 230, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(240, 35, 65, .02);
    }
}

@keyframes blinker1a {

    0%,
    100% {
        background: #ffffff;
        box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65, 1);
    }

    50% {
        background: rgba(230, 230, 230, 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(240, 35, 65, 0.2);
    }
}

@-webkit-keyframes blinker2a {

    0,
    100% {
        background: #5a5a5a;
        box-shadow: 0px 4.66667px 24px 3px #d9d9d9;
    }

    50% {
        background: rgba(230, 230, 230, 0.4);
        box-shadow: 0px 4.6667px 24px 3px rgba(66, 178, 97, 0.2);
    }
}

@keyframes blinker2a {

    0%,
    100% {
        background:rgba(102, 255, 0,1);
        box-shadow: 0px 4.66667px 24px 3px rgba(255,230,65, 1); 
    }

    50% {
        background: rgba(3, 125, 80, 0.4);
        box-shadow: 0px 4.66667px 24px 3px  #037d50;
    }
}

@-webkit-keyframes blinker3a {

    0%,
    100% {
        background: #ff6782;
        box-shadow: 0px 4.6667px 24px 3px rgba(255,230,65, 1); 
    }

    50% {
        background: rgba(255, 231, 235 , 0.4);
        box-shadow: 0px 4.66667px 24px 3px rgba(100, 40.4, 51, 0.2);
    }

    @keyframes blinker3a {

        0%,
        100% {
            background: #F9FBEE;
            box-shadow: 0px 4.66667px 24px 3px #F9FBEE;
        }

        50% {
            background: rgba(249, 251, 238, 0.4);
            box-shadow: 0px 4.66667px 24px 3px rgba(249, 251, 238, 0.2);
        }
    }
}



/* ############################################## 
Lights 3 every other blinking
########### */
.string3{
    text-align: center;
    white-space: nowrap;
    position: absolute;
    padding: 0;
    margin: -15px 70px 0 0;
    padding: 0 0 0 0;
    pointer-events: none;
    width: 100%;
 }

.string3 li {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 12px;
    height: 28px;
    border-radius: 50%;
    margin: 20px;
    top: 40px;   /*102px */
    display: inline-block;
    animation-duration: 3s;
    animation-fill-mode: both;
    animation-iteration-count:infinite;
    animation-name: even-flash;
}

 .string3 li:nth-child(odd){
     animation-name: odd-flash;
 }

.string3 li:before {
    content: "";
    position: absolute;
    background: #222;
    width: 10px;
    height: 9.33333px;
    border-radius: 3px;
    top: -4.66667px;
    left: 1px;
}

.string3 li:after {
    content: "";
    top: -14px;
    left: 9px;
    position: absolute;
    width: 52px;
    height: 18.66667px;
    border-bottom: solid #222 2px;
    border-radius: 50%;
}

.string1 li:last-child:after {
    content: none;
}

.string1 li:first-child {
    margin-left: 40px;
}
@keyframes even-flash {
    0%, 100% {
        background: rgba(102, 255, 0,1);
        box-shadow: 0px 2px 20px 4px rgba(255,230,65,1);
    }
    50% {
        background: rgba(	2, 108, 69,0.5);
        box-shadow: 0px 2px 20px 4px rgba(255,230,65,0.3);
    }
}

@keyframes odd-flash {
    50% {
        background: rgba(255,0,0,1);
        box-shadow: 0px 2px 20px 4px rgba(255,230,65,1);
    }
    0%,100% {
        background: rgba(139, 0, 0,0.5);
        box-shadow: 0px 2px 20px 4px rgba(255,230,65,0.3);
    }
.string3 li {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 15px;
    height: 30px;
    border-radius: 50%;
    margin: 0px 15px;
    top: 40px;   /*102px */
    display: inline-block;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-iteration-count:infinite;
    animation-name: even-flash;
}

 .string3 li:nth-child(odd){
     animation-name: odd-flash;
 }

#string3 li:before {
    content: "";
    position: absolute;
    width: 14px;
    height: 10px;
    border-radius: 4px;
    top: -5px;
    left: 0px;
    background: #444;
}

@keyframes even-flash {
    0%, 100% {
        background: rgba(255,230,65,1);
        box-shadow: 0px 2px 20px 4px rgba(255,230,65,1);
    }
    50% {
        background: rgba(255,230,65,0.5);
        box-shadow: 0px 2px 20px 4px rgba(255,230,65,0.3);
    }
}

@keyframes odd-flash {
    50% {
        background: rgba(255,65,185,1);
        box-shadow: 0px 2px 20px 4px rgba(255,65,185,1);
    }
    0%,100% {
        background: rgba(255,65,185,0.5);
        box-shadow: 0px 2px 20px 4px rgba(255,65,185,0.3);
    }
}, 
              
            
!

JS

              
                
              
            
!
999px

Console