123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              .container
  %h1 Button loading bar
  %h2 Inspired by <a href="https://codepen.io/Jackthomsonn/" target="_blank">@jackthomsonn</a> and his <a href="https://codepen.io/Jackthomsonn/pen/wModMm" target="_blank">funky loader</a>
  %input#funky{:type => 'checkbox'}
  %label{:for => 'funky'}
    .container_button
      %span <i class="icon ion-code-download"></i> <span>Download</span>
      <span class="downloading">Downloading</span>
      <i class="icon d_icon ion-cube"></i>
      <i class="icon complete ion-checkmark-round"></i>
      -(1..36).each do
        .point
      .container_button__bar
  %a.download{:href => 'https://codepen.io/jcoulterdesign/pens/popular/',:target => '_blank'} 
    <i class="icon ion-eye"></i> <span>View my other pens</span>
  %a.follow{:href => 'https://codepen.io/jcoulterdesign/',:target => '_blank'} 
    <i class="icon ion-social-codepen-outline"></i> <span>Follow me on codepen</span>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Nunito:400,700,300);
*{
  box-sizing:border-box;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
body{
  font-family: 'Nunito', sans-serif;
  background:#2C363F;
  .container{
    a.download,a.follow{i{margin-right:10px;}text-align:center;margin-top:80px;width:300px;
      float:left;display: inline-block;padding: 16px 30px;background: #41EFB6;color: white;font-weight: 900;font-family: 'nunito';text-decoration: none;border-radius: 4px;margin-right:12px;}
a.follow{
      float:left;padding: 14px 30px;background: none;color: white;border:2px solid white;&:hover{color:#41EFB6;border-color:#41EFB6;}}
    a{
      color:#28ECC3;
      
    }
    h1{
      color:white;
      text-align:center;
      margin:0;
      
    }
    h2{
      margin:10px 0px 80px 0px;
      color:white;
      font-size:14px;
      text-align:center;
    }
    position:absolute;
    left:0;
    right:0;
    top:50%;
    transform:translateY(-50%);
    width:660px;
    margin:auto;
    &_button{
      border:2px solid #28ECC3;
      width:200px;
      text-align:center;
      height:48px;
      padding: 2px 4px;
      border-radius:100px;
      color: white;
      margin:0 auto;
      transition:all .3s;
      position:relative;
      z-index:3;
      line-height:42px;
      text-transform:uppercase;
      font-weight:700;
      font-size:14px;
      &:hover{
        box-shadow:0px 0px 0px 6px rgba(0, 0, 0, 0.2);
        background:#28ECC3;
        span{
          i{
            margin-right:10px;
          }
          .large{
            //opacity:.3;
          }
        }
      }
      &:active{
        box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2);
      }
      //letter-spacing:1px;
      &__bar{
        width:0%;
        position:absolute;
        height:8px;
        top:4px;
        border-radius:100px;
        background: -webkit-linear-gradient(left, #28ECC3 0%, #0BC9A1 100%);
      }
    }
    input{
      display:none;
    }
    input:checked + label .container_button span{
      span{
        opacity:0;
        left:40px;
      }
      i{
        opacity:0;
        left:-40px;
      }
    }
    input:checked + label .container_button{
      animation:base .96s .12s cubic-bezier(0.755, -0.245, 0.175, 1.000) forwards, pulse .5s forwards,final .3s 3.6s forwards;
      .downloading{
        animation:pop .2s 1s forwards,popout .2s 3.4s forwards;
      }
      .d_icon{
        animation:d_icon .6s 1s forwards,wobble .4s 3.58s forwards,iconout .14s 4.45s forwards;
      }
      .complete{
        animation: d_icon .14s 4.55s forwards;
      }
      .point{
        @for $i from 1 through 36{
          &:nth-of-type(#{$i}){
            animation: dot .14s (($i / 260) + 4s) forwards;
          }
        }
      }
      &:hover{
        box-shadow:none;
      }
      &__bar{
        //box-shadow: 0px 0px 24px 6px rgba(0, 255, 202, 0.13);
        animation: bar 2.6s 1.14s cubic-bezier(0.190, 1.000, 0.220, 1.000) forwards,barout .3s 3.2s forwards;

      }
    }
    label{
      cursor:pointer;
      .downloading{
        position:absolute;
        left:0;
        right:0;
        margin:auto;
        top:28px;
        opacity:0;
        font-size:12px;
      }
      .point{
          opacity: 0;
    width: 2px;
    height: 6px;
    transform-origin: 60px 0px;
    background: #28ECC3;
    border-radius: 10px;
    position: absolute;
    left: -11px;
    top: 50px;
        @for $i from 1 through 36{
          &:nth-of-type(#{$i}){
            transform:rotate($i * 10deg)
          }
        }
      }
      .complete{
        position:absolute;
        left:0;
        right:0;
        margin:auto;
        top:50%;
        z-index:2;
        transform:translateY(-50%) scale(0);
        font-size:32px;
      }
      .d_icon{
        position:absolute;
        left:0;
        right:0;
        margin:auto;
        top:50%;
        z-index:2;
        transform:translateY(-50%) scale(0);
        font-size:32px;
      }
      span{
        opacity:1;
        transition:all .18s;
        position:relative;
        top:-3px;
        i{
          font-size:22px;
          margin-right:6px;
          position:relative;
          left:0;
          transition:all .2s;
          top:3px;
        }
        span{
          left:0;
          top:0px;
          transition:all .2s;
        }
        .large{
          position:absolute;
          opacity:0;
          transition:all .3s .1s;
          left:-59px;
          top:-21px;
          font-size:60px;
        }
      }
    }
  }
}

// Animations

@keyframes base{
  0%{border:none;}
  50%{width:20px;height:40px;background:#28ECC3;height:16px;border:none;}
  75%{background: rgba(0, 0, 0, 0.34);border:none;}
  76%{width:405px;height:16px;background: rgba(0, 0, 0, 0.34);border:none;}
  88%{width:384px;height:16px;background: rgba(0, 0, 0, 0.34);border:none;}
  100%{width:400px;height:16px;background: rgba(0, 0, 0, 0.34);border:none;}
}

@keyframes bar{
  0%{}
  100%{width:98%;}
}

@keyframes pulse{
  0%{
    box-shadow:0px 0px 0px 6px rgba(0, 0, 0, 0.08);
  }
  100%{
    box-shadow:0px 0px 0px 1920px rgba(0, 0, 0, 0);
  }
}

@keyframes pop{
  0%{}
  100%{opacity:1;
    top:23px;}
}
@keyframes popout{
  0%{opacity:1;top:23px;}
  100%{opacity:0;
    top:28px;}
}
@keyframes barout{
  0%{}
  100%{opacity:0;}
}
@keyframes final{
  0%{background: rgba(0, 0, 0, 0.34)}
  50%{background: rgba(0, 0, 0, 0.34);width:100px;height:100px;box-shadow:none;}
  100%{width:100px;height:100px;background:none}
}

@keyframes d_icon{
  0%{transform:translateY(-50%) scale(0);}
  25%{transform:translateY(-50%) scale(1.2);}
  50%{transform:translateY(-50%) scale(.9);}
  75%{transform:translateY(-50%) scale(1.1);}
  100%{transform:translateY(-50%) scale(1);}
}

@keyframes iconout{
  0%{transform:translateY(-50%) scale(1);}
  100%{transform:translateY(-50%) scale(0);}
}

@keyframes dot{
  0%{opacity:0;}
  100%{opacity:1;}
}

@keyframes wobble{
  0%{transform:translateY(-50%) scale(1);}
  25%{transform:translateY(-50%) scale(1.2);}
   50%{transform:translateY(-50%) scale(0.9);}
   75%{transform:translateY(-50%) scale(1.1);}
   100%{transform:translateY(-50%) scale(1);}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console