Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <body>
  <div class='wrapper'>
    <div class='bar'>
      <div class='bar-info html' data-total='95'>
        HTML
        <span class='percent'>95</span>
      </div>
    </div>

    <div class='bar'>
      <div class='bar-info css' data-total='95'>
        CSS
        <span class='percent'>95</span>
      </div>
    </div>

    <div class='bar'>
      <div class='bar-info js' data-total='90'>
        JavaScript
        <span class='percent'>90</span>
      </div>
    </div>
    
    <div class='bar'>
      <div class='bar-info ps' data-total='85'>
        Photoshop
        <span class='percent'>85</span>
      </div>
    </div>
  </div>
  <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
</body>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);

$red: #fd7473;
$yellow: #fec951;
$blue: #47b8e0;
$purp: #9f68d0;

body{
  background: #1F1E24;
  height: 200px;
  font-family: 'Open Sans', sans-serif;
}

.wrapper{
  margin: 0 auto;
  width: 90%;
  margin-top: 15px;
}

.bar{
  position: relative;
  width: 100%;
  height: 48px;
  background: rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
  border-radius: 5px;
  .bar-info{
    border-radius: 5px;
    padding: 0.75rem;
    background: $red;
    color: white;
    width: 10%;
    position: relative;
    height: 24px;
    transition: width 3.3s ease-in-out;
    .percent{
      float: right;
    }
    &.html{
      background: linear-gradient($red, #FC688E), $red;
    }
    &.css{
      background: linear-gradient($yellow, #FCAD44), $yellow;
    }
    &.js{
      background: linear-gradient($blue, #28BEFA), $blue;
    }
    &.ps{
      background: linear-gradient($purp, #BB68D0), $purp;
    }
  }
}
              
            
!

JS

              
                // When the DOM is loaded and ready, let's do some shit!
$(document).ready(function() {
  function skillSet() {
    // Iterate over each element w/ a class of
    // bar-info, storing the value of data-total
    // in a variable.  Using jQuery's CSS method,
    // dynamically update the width of each bar.
    $('.bar-info').each(function() {
      total = $(this).data("total");
      $(this).css("width", total + "%");
    });
    
    // Iterate over each element w/ the class percent.  Using
    // jQuery's $(this) will allow us to interact w/ each specific
    // object in the loop.  Then use jQuery's super awesome animate method
    // to implement a counter on each .percent element, which will "count"
    // up incrementally until it reaches the number inside the percent span,
    // aka it's "ceiling".
    $('.percent').each(function() {
      var $this = $(this);
      $({
        Counter: 10
      }).animate({
        Counter: $this.text()
      }, {
        duration: 3000,
        easing: 'swing',
        step: function() {
          $this.text(Math.ceil(this.Counter) + "%");
        }
      });
    });
  };
  // Invoke our skillSet function inside a setTimeout, 
  // to create a short delay before the animation begins.
  setTimeout(skillSet, 1000);
});
              
            
!
999px

Console