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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html>
    <head>
        <title>Stranger things wall</title>
        <style>
            body
            {
                background-image: url('https://images.wallpaperscraft.com/image/paper_rope_old_91698_1280x720.jpg');
              background-size: cover;
                
            }
            .wire
            {
                text-align: center;
                white-space: nowrap;
                position: absolute;
                padding: 0;
                width: 100%;
                top: -80px;
                border-bottom: 1px solid black;
                height: 100px;
            }
            .wire li
            {
                position: relative;
                list-style: none;
                margin: 0 15px;
                padding: 0;
                display: inline-block;
                width: 15px;
                height: 25px;
                border-radius: 50%;
                top: 102px;
                background: white;
            }
            .wire li:before
            {
                content: "";
                position: absolute;
                width: 14px;
                height: 10px;
                border-radius: 4px;
                top:-5px;
                left: 0;
                background-color: black;
            }
            .wire li:nth-child(odd)
            {
              background-color: rgba(0,153,255,0.8);
              box-shadow: 0px 2px 20px 4px rgba(0,153,255,0.8);
            }
           /* .wire li:nth-child(3n)
            { 
                background-color: rgba(15, 100, 60, 0.9);
                box-shadow: 0px 2px 20px 4px rgba(15, 100, 60, 0.9);
                
            }*/
            .wire li:nth-child(even)
            {
                background-color: rgba(255,105,180,0.9);
                box-shadow: 0px 2px 20px 4px rgba(255,105,180,0.9);
            }
            /*@keyframes third-flash
            {
                0%, 100%
                {
                    background-color: rgba(15, 100, 60, 0.9);
                    box-shadow: 0px 2px 20px 4px rgba(15, 100, 60, 0.9);
                }
                50%
                {
                    
                    background-color:rgba(15, 100, 60, 0.5);
                    box-shadow: 0px 2px 20px 4px rgba(240, 255, 0, 0.5);
                }
            }
            @keyframes even-flash
            {
                0%, 100%
                {
                    background-color: rgba(255,105,180,0.9);
                    box-shadow: 0px 2px 20px 4px rgba(255,105,180,0.9);
                }
                50%
                {
                    
                    background-color:rgba(255,105,180,0.5);
                    box-shadow: 0px 2px 20px 4px rgba(240, 255, 0, 0.5);
                }
            }
            @keyframes odd-flash
            {
                50%
                {
                    background-color: rgba(0,153,255,0.8);
                    box-shadow: 0px 2px 20px 4px  rgba(240, 255, 0, 0.5);
                }
                0%, 100%
                {
                    
                    background-color: rgba(0,153,255,0.5);
                    box-shadow: 0px 2px 20px 4px rgba(0,153,255,0.5);
                }
            }*/
            .eachKey
            {
                height: 30px;
                width: 30px;
                background-color: rgba(0,0,0,0.7);
                color: white;
                font-size: 1rem;
                border-radius: 50%;
                text-align: center;
                float: left;
                margin: 2%;
                box-shadow: 0.25rem 0.25rem 0.5rem 0.75rem rgba(255,255,255,0.2);
            }
            .keypad
            {
                position: relative;
                margin-top: 20vh;
                margin-left: 5vw;
                height: auto;
                width: 100%;
                
                text-align: center;
                color: white;
                background-color: rgba(0,0,0,0.5);
            }
        </style>
        <script src="./StrangerThingsScript.js"></script>
        
    </head>
    <body>
        <ul class="wire" id="setOne">
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
         <div class="keypad">
            <div class="eachKey">
                A
            </div>
            <div class="eachKey"> 
                B
            </div>
            <div class="eachKey">
                C
            </div>
            <div class="eachKey">
                D
            </div>
            <div class="eachKey">
                E
            </div>
            <div class="eachKey">
                F
            </div>
            <div class="eachKey">
                G
            </div>
            <div class="eachKey">
                H
            </div>
        </div><br/>
        <ul class="wire" id="setTwo" style="position: relative; margin-top: 40px;">
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
        </ul>
        <div class="keypad" style="position: relative; margin-top: 0; bottom: 22vh; margin-left: 3vw;">
        	<div class="eachKey">
                I
            </div>
            <div class="eachKey">
                J
            </div>
            <div class="eachKey">
                K
            </div>
            <div class="eachKey">
                L
            </div>
            <div class="eachKey">
                M
            </div>
            <div class="eachKey">
                N
            </div>
            <div class="eachKey">
                O
            </div>
            <div class="eachKey">
                P
            </div>
            <div class="eachKey">
                Q
            </div>
          </div>

        <!--<ul class="wire" id="setThree" style="position: relative; margin-top: -30px;">
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
        </ul>
        <div class="keypad" style="position: relative; margin-top: 0; bottom: 22vh; margin-left: 3vw;">
        	
            <div class="eachKey">
                R
            </div>
            <div class="eachKey">
                S
            </div>
            <div class="eachKey">
                T
            </div>
            <div class="eachKey">
                U
            </div>
            <div class="eachKey">
                V
            </div>
            <div class="eachKey">
                W
            </div>
            <div class="eachKey">
                X
            </div>
            <div class="eachKey">
                Y
            </div>
            <div class="eachKey">
                Z
            </div>
        </div>-->
        <div style="position: relative; margin-left: 20vw; bottom: 10vw;">
        
        <input type="text" id="message" placeholder="Enter the message here">
        <button type="button" onclick="illuminateLight()">CLICK ME</button>
        
        </div>
        <br/>
    </body>
    
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
                    }
async function illuminateLight(index)
{
    message=document.getElementById("message").value;
    message=message.toLocaleUpperCase();
    message=message.split(" ").join("")
    //window.alert(message)
for(i=0;i<message.length; i++)
{   index=message.charCodeAt(i)-65;
    //window.alert(index);
    let colorValue=''
    if(index>=0 && index<=7)
    {
        ele=document.getElementById("setOne").getElementsByTagName("li")
    }
    else if(index>=8&&index<=16)
    {
        ele=document.getElementById("setTwo").getElementsByTagName("li")
        index=index-8;
    }
    else if(index>=17&&index<=25)
    {
        ele=document.getElementById("setThree").getElementsByTagName("li")
        index=index-17;
    }
        //window.alert(ele[index])
        if(index%2!=0)
        {  //PINK
            ele[index].style.backgroundColor='#ff99ff';
            colorValue='rgba(255,105,180,0.9)'
            ele[index].style.boxShadow='0px 2px 20px 4px #ffff00';
        }
       /*else if(index==2 || index===8)
        {
            //GREEN
            ele[index].style.backgroundColor='#00ff00';
            colorValue='rgba(15, 100, 60, 0.9);'
            ele[index].style.boxShadow='0px 2px 20px 4px #ffff00';
            window.alert("Over here")
        }*/
       else
        {
            //BLUE
            ele[index].style.backgroundColor='aqua';
            colorValue='rgba(0,153,255,0.8)'
            ele[index].style.boxShadow='0px 2px 20px 4px  #ffff00';
        }
    
    await sleep(1000)
    //window.alert(colorValue)
    ele[index].style.backgroundColor=colorValue;
    ele[index].style.boxShadow='0px 2px 20px 4px  '+colorValue;
    await sleep(500)
    }
    
}

              
            
!
999px

Console