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="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="scene">
        <div class="sticks" id="sticks">
            
            <div class="stick red bubble-stick" id="bubble">
                <div class="bubble bubble-1"></div>
                <div class="bubble bubble-2"></div>
                <div class="bubble bubble-3"></div>
                <div class="bubble bubble-4"></div>
                <div class="bubble bubble-5"></div>
                <div class="bubble bubble-6"></div>
                <div class="bubble bubble-7"></div>
                <div class="bubble bubble-8"></div>
                <div class="bubble bubble-9"></div>
                <div class="bubble bubble-10"></div>
                <div class="bubble bubble-11"></div>
                <div class="bubble bubble-12"></div>
                <div class="bubble bubble-13"></div>
                <div class="bubble bubble-14"></div>
            </div>
            
            <div class="stick yellow triangle-stick" id="triangle">
                <div class="triangle triangle-1"></div>
                <div class="triangle triangle-2"></div>
                <div class="triangle triangle-3"></div>
                <div class="triangle triangle-4"></div>
                <div class="triangle triangle-5"></div>
                <div class="triangle triangle-6"></div>
                <div class="triangle triangle-7"></div>
                <div class="triangle triangle-8"></div>
                <div class="triangle triangle-9"></div>
                <div class="triangle triangle-10"></div>
                <div class="triangle triangle-11"></div>
                <div class="triangle triangle-12"></div>
                <div class="triangle triangle-13"></div>
                <div class="triangle triangle-14"></div>
            </div>

            <div class="stick purple block-stick" id="block">
                <div class="block block-1">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-2">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-3">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-4">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-5">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-6">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-7">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-8">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-9">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-10">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-11">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-12">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-13">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
                <div class="block block-14">
                    <div class="inner"></div>
                    <div class="inner inner-2"></div>
                </div>
            </div>

        </div>
    </div>

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

</div>
              
            
!

CSS

              
                @mixin bubble_shape ($width: 4px) {
  border-radius: 50%;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.12);
  border-width: $width;
}

@mixin bubble ($size, $top, $left) {
  height: $size;
  width: $size;
  top: $top;
  left: $left;
}

@mixin bubble_hollow ($size, $top, $left) {
  @include bubble ($size, $top, $left);
  background-color: transparent;
  border-style: solid;
}

@mixin triangle ($height, $width, $top, $left) {
  border-left: ($height/2) solid transparent;
  border-right: ($height/2) solid transparent;
  border-bottom: $width solid rgba(0, 0, 0, 0.12);
  background-color: transparent;
  left: $left;
  top: $top;
}

@mixin triangle_hollow ($height, $width, $top, $left) {
  @include triangle( $height, $width, $top, $left);
  &:after {
    content: " ";
    display: block;
    position: absolute;
    border-left: ($height/4-1) solid transparent;
    border-right: ($height/4-1) solid transparent;
    border-bottom: ($height/2-3) solid transparent;
    top: 6px;
    left: -($width/4);
    transition: border-bottom-color 0.4s ease;
    .red & {
      border-bottom-color: #fc5c82;
    }
    .yellow & {
      border-bottom-color: #fcd45c;
    }
    .purple & {
      border-bottom-color: #9174f5;
    }
  }
}

@mixin block ($height, $width, $top, $left) {
  height: $height;
  width: $width;
  top: $top;
  left: $left;
}

@mixin block_hollow ($height, $width, $top, $left) {
  @include block ($height, $width, $top, $left);
  & .inner {
    background-color: transparent !important;
    border-style: solid;
    box-sizing: border-box;
  }
}

.bubble {
  @include bubble_shape;
}

.bubble-1 {
  @include bubble(15px, 21px, 59px);
}

.bubble-2 {
  @include bubble(27px, 36px, 16px);
}

.bubble-3 {
  @include bubble(21px, 63px, 49px);
}

.bubble-4 {
  @include bubble(15px, 98px, 37px);
}

.bubble-5 {
  @include bubble_hollow(5px, 116px, 20px);
}

.bubble-6 {
  @include bubble(6px, 128px, 63px);
}

.bubble-7 {
  @include bubble(27px, 150px, 52px);
}

.bubble-8 {
  @include bubble(19px, 154px, 18px);
}

.bubble-9 {
  @include bubble(10px, 189px, 13px);
}

.bubble-10 {
  @include bubble_hollow(5px, 199px, 52px);
}

.bubble-11 {
  @include bubble(21px, 220px, 29px);
}

.bubble-12 {
  @include bubble(21px, 263px, 48px);
}

.bubble-13 {
  @include bubble_hollow(5px, 275px, 16px);
}

.bubble-14 {
  @include bubble(15px, 296px, 34px);
}

.triangle {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.12);
}

.triangle-1 {
  @include bubble_shape;
  @include bubble(10px, 22px, 55px);
}

.triangle-2 {
  @include triangle_hollow(16px, 14px, 27px, 15px);
}

.triangle-3 {
  @include triangle_hollow(24px, 19px, 60px, 43px);
}

.triangle-4 {
  @include bubble_shape(3px);
  @include bubble_hollow(8px, 61px, 17px);
}

.triangle-5 {
  @include triangle(10px, 8px, 101px, 25px);
  transform: rotate(180deg);
}

.triangle-6 {
  @include triangle(8px, 6px, 103px, 60px);
  transform: rotate(-90deg);
}

.triangle-7 {
  @include triangle(25px, 19px, 126px, 17px);
  transform: rotate(180deg);
}

.triangle-8 {
  @include triangle(21px, 16px, 149px, 50px);
}

.triangle-9 {
  @include triangle(11px, 8px, 177px, 21px);
}

.triangle-10 {
  @include bubble_shape;
  @include bubble(10px, 177px, 60px);
}

.triangle-11 {
  @include triangle(18px, 13px, 213px, 33px);
  transform: rotate(180deg);
}

.triangle-12 {
  @include bubble_shape(2px);
  @include bubble_hollow(10px, 233px, 65px);
}

.triangle-13 {
  @include bubble_shape;
  @include bubble(10px, 250px, 22px);
}

.triangle-14 {
  @include triangle_hollow(16px, 14px, 270px, 45px);
  transform: rotate(180deg);
}

.stick {
  .block {
    position: absolute;
    overflow: hidden;
    z-index: 999;
    border-radius: 7px;
    .inner {
      border-radius: 7px;
      background-color: rgba(0, 0, 0, 0.12);
      border-color: rgba(0, 0, 0, 0.12);
      border-width: 3px;
      height: 100%;
      width: 100%;
      position: absolute;
    }
    &:nth-child(2n+1) .inner-2 {
      left: -200%;
    }
    &:nth-child(2n+2) .inner-2 {
      left: 200%;
    }
  }
  .block-1 {
    @include block_hollow(16px, 31px, 16px, 30px);
  }
  .block-2 {
    @include block(14px, 42px, 50px, 15px);
  }
  .block-3 {
    @include block(18px, 9px, 73px, 64px);
  }
  .block-4 {
    @include block(9px, 14px, 84px, 26px);
  }
  .block-5 {
    @include block(15px, 15px, 109px, 45px);
    .inner {
      border-radius: 50%;
    }
  }
  .block-6 {
    @include block(9px, 27px, 135px, 19px);
  }
  .block-7 {
    @include block(12px, 12px, 144px, 60px);
    .inner {
      border-radius: 50%;
      border-style: solid;
      box-sizing: border-box;
      background-color: transparent;
    }
  }
  .block-8 {
    @include block(27px, 14px, 164px, 24px);
  }
  .block-9 {
    @include block(8px, 8px, 188px, 64px);
  }
  .block-10 {
    @include block_hollow(12px, 22px, 219px, 11px);
  }
  .block-11 {
    @include block(22px, 22px, 226px, 50px);
    .inner {
      border-radius: 50%;
    }
  }
  .block-12 {
    @include block(18px, 9px, 248px, 26px);
  }
  .block-13 {
    @include block(8px, 8px, 278px, 50px);
    .inner {
      border-radius: 50%;
    }
  }
  .block-14 {
    @include block_hollow(12px, 22px, 297px, 18px);
  }
  .block-15 {
    @include block(9px, 27px, 307px, 48px);
  }
}

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

.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);
}

.sticks {
  z-index: 9999;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  margin-top: auto;
}

.stick {
  height: 362px;
  width: 90px;
  border-radius: 14px;
  background-image: url(https://greghub.github.io/coloron/public/svg/noise.png);
  position: relative;
  overflow: hidden;
  float: left;
  margin-right: 90px;
  transition: background-color 0.4s ease;
}

.stick.red {
  background-color: #FF4571;
}

.stick.yellow {
  background-color: #FFD145;
}

.stick.purple {
  background-color: #8260F6;
}

.scene {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: fixed;
  z-index: 9997;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

@media screen and (max-height: 480px) {
  .sticks {
    transform: scale(0.7);
    transform-origin: bottom;
    .stick {
      margin-right: 20px;
      margin-left: 20px;
    }
  }
  .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

              
                function playBubble(el) {
    var bubble = new TimelineMax();
    bubble.staggerFromTo(el.find('.bubble'), 0.3, {scale: 0.1}, {scale: 1}, 0.03)
    bubble.staggerTo(el.find('.bubble'), 0.5, {y: '-=60px', yoyo: true, repeat: -1}, 0.03);
}

function playTriangle(el) {
    var triangle = new TimelineMax({delay: 0.5});
    triangle.staggerFromTo(el.find('.triangle'), 0.3, {scale: 0.1}, {scale: 1}, 0.03)
            .staggerTo(el.find('.triangle'), 1.5, {
                cycle:{
                    rotationY: [0, 360],
                    rotationX: [360, 0],
                },
                repeat: -1,
                repeatDelay: 0.1
            }, 0.1);
}

function playBlock(el) {
    var block = new TimelineMax({delay: 1});
    var block2 = new TimelineMax({delay: 1.69});

    block.staggerFromTo(el.find('.block'), 0.3, {scale: 0.1}, {scale: 1}, 0.03)
         .staggerTo(el.find('.block .inner:not(.inner-2)'), 1, {
                cycle: {
                    x: ["+200%", "-200%"]
                },
                repeat: -1,
                repeatDelay: 0.6,
            }, 0.1);
    block2.staggerTo(el.find('.block .inner-2'), 1, {
                cycle: {
                    x: ["+200%", "-200%"]
                },
                repeat: -1,
                repeatDelay: 0.6,
            }, 0.1);
}

$(document).ready(function(){
  playBubble($('#bubble'));  
  playTriangle($('#triangle')); 
  playBlock($('#block')); 
})
              
            
!
999px

Console