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.

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="css/normalize.min.css">
        <link rel="stylesheet" href="css/main.css">
      <div class="main-container">
        <div class="firework"></div>
        <div class="loader-container">
          <div class="loader-spark"></div>
          <progress value="0" max="100" class="progress-bar"></progress>
          <h2 class="loading-title">
            <span class="loading-title-val">
            <span class="loading-title-wait">Loading, please wait</span>

      <script src="//"></script>
      <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.1.min.js"><\/script>')</script>

      <script src="js/main.js"></script>


/* =======================
   Page Load Styles
   @autor: Yane Frenski
   ===================== */

html, body{
  height: 100%;
  margin: 0;
  paddin: 0;
  background: white;

  position: relative;
  background-color: #231e1f;

  width: 200px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -120px;
  font-family: Georgia, Times, 'Times New Roman', serif;

  border: none;
  width: 200px;
  height: 1px;

.progress-bar[value]::-webkit-progress-bar {

.progress-bar[value]::-webkit-progress-value {

.progress-bar[value]::-moz-progress-bar { 

.progress-bar[aria-valuenow]:before  {
    background: #231E1F;

  width: 15px;
  height: 15px;
  background: url('') no-repeat left top;
  position: absolute;
  top: 10px;
  left: -10px;

  font-size: 1em;
  font-style: italic;
  color: #e9d9c6;
  text-align: center;
  font-weight: normal;
  margin: 30px 0 0 0;

.loading-title .loading-title-val{
  display: block;
  color: #ffae05;
  margin-bottom: 10px;

  width: 40px;
  height: 105px;
  background: url('') no-repeat 0 0;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: 70px;
  margin-top: -51px;
 * Javascript for the progress bar
 * @author - Yane

$(document).ready(function() {  
    var pBar = $('.progress-bar');
    var spark = $('.loader-spark');
    var firework = $('.firework');
    var lTitleVal = $('.loading-title-val');
    var lTitleWait = $('.loading-title-wait');
    var mainContainer = $('.main-container')
    var loadMax = pBar.attr('max');  
    var loadValue = pBar.val();
    var sparStartPos = spark.position().left;
    var pBarWidth = $('.progress-bar').width();
    var pBarStep = pBarWidth/loadMax;
    // A function to update the progress bar and spark values
    // retruns 'loaded' when it's done
    var loadingUpdate = function ( val ){
      addValue = pBar.val(val);
      spark.css( 'left', (sparStartPos + val*pBarStep) + 'px' );
      lTitleVal.text( val+'%' );
      if ( val == loadMax ){
        lTitleWait.text( 'Loaded! Launching it!' );
        return 'loaded';
        return 'loading';
    // An action to take after it's loaded
    var launchIt = function (){
      spriteAnimation( firework, 40, 30, 0, 9, false, function(){
        spriteAnimation( firework, 40, 30, 9, 18, true, false);
        firework.delay(300).animate({top:"-200px"}, 1000, function(){
    // Function for the sprite animation
    var spriteAnimation = function ( el, 
                                     fallback ){
      var frame = frameStart;
      var animateSprite = function(){
        frame ++;

        $( el ).css('background-position','-'+(frame*spriteWidth)+'px 0');

        if ( frame < frameCount ) {
          setTimeout(function() {
            animateSprite( );
          }, spriteAnimFrame);
          if ( loop ){
            frame = frameStart;
            animateSprite( );
            if( fallback ){
              try {
              catch(err) {


    // simuating loading in order to show how it works, since we have actually
    // nothing to load currently
    var simulateLoading = function(){
      var timeInterval = (1000/loadMax)*5; 

      var loading = function() {  
          loadValue += 1;  

          if (loadingUpdate(loadValue) == 'loaded') {  

      var animateProgress = setInterval(function() {  
      }, timeInterval);
    spriteAnimation( spark, 15, 30, 0, 10, true, false );

🕑 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.