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.

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

              
                <div class="container">

    <div class="stop-game game-full-flex">
      <div class="score">

        <div class="score-container">

            <h1>Coloron</h1>

            <div class="final-score">21!</div>
            <div class="result">Awesome!</div>

            <h4>Tweet to challenge friends</h4>

            <p>
                <a class="tweet" href="#" onclick="game.generateTweet()">
                    <i class="fa fa-twitter" aria-hidden="true"></i> Tweet
                </a>
            </p>

            <div>
                <a class="play-again" href="#" onclick="game.start()">Play Again</a>
                <a class="main-menu" href="#" onclick="game.intro()">Menu</a>
            </div>

        </div>
        
      </div>

    </div>

    <div class="small-glows"></div>

    <div class="glow"><div class="sun"></div></div>

    <div class="waves">
        <div class="top_wave"></div>
        <div class="wave1"></div>
        <div class="wave2"></div>
        <div class="wave3"></div>
        <div class="wave4"></div>
    </div>

    <div class="mounts">
        <div class="mount1"></div>
        <div class="mount2"></div>
    </div>

    <div class="clouds"></div>


    <div class="noise"></div>

</div>
              
            
!

CSS

              
                
body {
    background-color: #28DAD4;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

body * {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Chrome/Safari/Opera */
     -khtml-user-select: none; /* Konqueror */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  not supported by any browser */
}

a {
    cursor: url(https://greghub.github.io/coloron/public/svg/cursor.svg), pointer;
    &:focus, &:active {
    cursor: url(https://greghub.github.io/coloron/public/svg/cursor-tap.svg), pointer;
    }
}
.container {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
}
.waves, .mounts {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
}
.waves div, .mounts div {
    position: absolute;
    width: 100%;
}
.clouds {
    position: absolute;
    width: 100%;
    left: 0;
    top: 77px;
    height: 151px;
    background: url(https://greghub.github.io/coloron/public/svg/clouds.svg) repeat-x;
    background-position-x: 170px; 
}
.top_wave {
    background: url(https://greghub.github.io/coloron/public/svg/top_wave.png) repeat-x 0 -1px;
    height: 35px;
    bottom: -1px;
    z-index: 10001;
}
.wave1 {
    background: url(https://greghub.github.io/coloron/public/svg/wave1.svg) repeat-x;
    height: 150px;
    bottom: 0;
    z-index: 23;
}
.wave2 {
    background: url(https://greghub.github.io/coloron/public/svg/wave2.svg) repeat-x;
    height: 180px;
    bottom: 30px;
    z-index: 22;
}
.wave3 {
    background: url(https://greghub.github.io/coloron/public/svg/wave3.svg) repeat-x;
    height: 180px;
    bottom: 90px;
    z-index: 21;
}
.wave4 {
    background: url(https://greghub.github.io/coloron/public/svg/wave4.svg) repeat-x;
    height: 180px;
    bottom: 120px;
    z-index: 20;
}
.mount1 {
    background: url(https://greghub.github.io/coloron/public/svg/mount1.svg) repeat-x;
    height: 150px;
    bottom: 280px;
    z-index: 11;
}
.mount2 {
    background: url(https://greghub.github.io/coloron/public/svg/mount2.svg) repeat-x;
    height: 150px;
    bottom: 290px;
    z-index: 10;
}
.noise {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1010;
    background: url(https://greghub.github.io/coloron/public/svg/noise.png);
}
.glow {
    position: absolute;
    left: -350px;
    top: -350px;
    width: 800px;
    height: 800px;
    background-color: rgba(81, 237, 200, 0.34);
    border-radius: 50%;
    box-shadow: 0 0 100px 100px rgba(81, 237, 200, 0.34);
    z-index: 1010;
}
.sun {
    position: relative;
    left: 50%;
    top: 50%;
    width: 1px;
    height: 1px;
    background-color: rgba(255, 227, 69, 1);
    border-radius: 50%;
    box-shadow: 0 0 32px 32px rgba(255, 227, 69, 1), 
                0 0 150px 150px rgba(103, 244, 210, 0.4);
}
.small-glow {
    z-index: 99;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.34);
}
.small-glow.yellow {
    background-color: rgba(255, 227, 69, 0.34);
    box-shadow: 0 0 4px 4px rgba(255, 227, 69, 0.34);
}

.game-full-flex {
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 99999;
}
.stop-game {
    justify-content: center;
    .score {
        display: inherit;
    }
    .score-container {
        background-color: #4C4660;
        width: 433px;
        height: 386px;
        border-radius: 38px;
        text-align: center;
        h1 {
            color: #fff;
            text-transform: uppercase;
            letter-spacing: -0.1em;
            margin-top: 20px;
            margin-bottom: 4px;
            font-size: 64px;
        }
        .final-score {
            color: #FFE345;
            font-weight: 900;
            font-size: 130px;
            letter-spacing: -6px;
            line-height: 110px;
        }
        .result {
            color: #FF4571;
            text-transform: uppercase;
            font-weight: 700;
            font-size: 30px;
        }
        h4 {
            color: #fff;
            margin-top: 12px;
        }
        .tweet {
            background: #fff;
            padding: 8px 20px;
            border-radius: 4px;
            color: #55ACEE;
            text-decoration: none;
            font-size: 18px;
            line-height: 24px;
            display: inline-block;
            &:hover {
                background-color: #55ACEE;
                color: #fff;
            }
            i {
                font-size: 24px;
                top: 2px;
                right: 2px;
                position: relative;
            }
        }
        .play-again {
            background-color: #FF4571;
            border: 2px solid #fff;
            color: #fff;
            text-decoration: none;
            text-transform: uppercase;
            font-weight: 900;
            letter-spacing: -1px;
            font-size: 26px;
            padding: 6px 24px;
            border-radius: 22px;
            margin: 6px 4px;
            display: inline-block;
            &:hover {
                background-color: lighten(#FF4571, 5%);
            }
        }
        .main-menu {
            background-color: #44BFA3;
            border: 2px solid #fff;
            color: #fff;
            text-decoration: none;
            text-transform: uppercase;
            font-weight: 900;
            letter-spacing: -1px;
            font-size: 26px;
            padding: 6px 24px;
            border-radius: 22px;
            margin: 6px 4px;
            display: inline-block;
            &:hover {
                background-color: lighten(#44BFA3, 5%);
            }
        }
    }
}

@media screen and (max-height: 480px) {
    .stop-game .score {
      background-color: #4C4660;
      width: 433px;
      height: 386px;
      border-radius: 38px;
      text-align: center;
      transform: scale(0.6);
    }
    .glow {    
        width: 240px;
        height: 240px;
        left: -90px;
        top: -90px;
    }
    .sun {
        box-shadow: 0 0 20px 20px rgba(255, 227, 69, 1), 
                    0 0 150px 150px rgba(103, 244, 210, 0.4);
    }
    .small-glow {
        transform: scale(0.5);
    }
    .waves div {
        background-size: auto 100%
    }
    .wave1, .wave2, .wave3, .wave4 {
        height: 80px;
    }
    .top_wave {
        height: 20px;
    }
    .wave1 {
        bottom: -20px;
    }
    .wave2 {
        bottom: 10px;
    }
    .wave3 {
        bottom: 40px;
    }
    .wave4 {
        bottom: 60px;
    }
    .mount1 {
        background-size: auto 80%;
        height: 80px;
        bottom: 120px;
    }
    .mount2 {
        background-size: auto 80%;
        height: 120px;
        bottom: 130px;
    }
    .clouds {
        top: 25px;
        height: 60px;
        background-size: auto 100%;
    }
}
@media screen and (max-height: 320px) {
    .rotate {
        position: fixed;
        z-index: 99999;
        background-color: #28DAD4;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        display: block;
        text-align: center;
        text-transform: uppercase;
        color: #fff;
    }
    .rotate:before {
        display: block;
        content: " ";
        height: 40%;
    }
}
              
            
!

JS

              
                $(document).ready(function(){
  var resultTimeline = new TimelineMax();
  resultTimeline
      .fromTo('.stop-game .score-container', 0.7, { opacity: 0, scale: 0.3 }, { opacity: 1, scale: 1, ease: Elastic.easeOut.config(1.25, 0.5)})
      .fromTo('.stop-game .final-score', 2, { scale: 0.5 }, { scale: 1, ease: Elastic.easeOut.config(2, 0.5)}, 0)
      .fromTo('.stop-game .result', 1, { scale: 0.5 }, { scale: 1, ease: Elastic.easeOut.config(1.5, 0.5)}, 0.3)
      ;
})
              
            
!
999px

Console