cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              <h1>OSX-style Disk Usage <xmp>..using html5 <meter></xmp></h1>

<p>
  Macintosh HD <span class="free-space">64.54 GB free out of 120.47 GB</span></p>

<meter value="55.93" min="0" max="120.47" title="GB">
  <div class="meter-gauge">
    <span style="width: 46.42%;">Disk Usage - 55.93GB out of 120GB</span>
  </div>
</meter>  
  
<ul class="swatch">
  <li class="swatch__elem">Audio <span class="used-space">670.5 MB</span></li>
  <li class="swatch__elem">Movies <span class="used-space">10.1 GB</span></li>
  <li class="swatch__elem">Photos <span class="used-space">25.19 GB</span></li>
  <li class="swatch__elem">Apps <span class="used-space">19.31 GB</span></li>
  <li class="swatch__elem">Other <span class="used-space">660.5 MB</span></li>
</ul>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Roboto);

body {
  
  font-family: "Roboto", "Lucida Grande", "Lucida", sans-serif;
  margin: 5em auto;
  background: radial-gradient(#f9f9f9 20%, #ddd 80%);
  width: 550px;
}

h1 {
  
  font-size: 1.5em;
  margin: 0 auto 2.5em;
  font-weight: 700;
}

xmp {
  
  font-family: Consolas, Monaco, monospace;
  font-size: 85%;
  color: #666;
  font-weight: 400;
}

meter {
  
  display: block;
  margin: 0 auto;
  
  width: 550px;
  height: 25px;
  
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;

  border: 1px solid #ccc;
  border-radius: 3px;
  
  /* Firefox */
  background: none; /* Required to get rid of the default background prop. */
  background-color: whiteSmoke;  
  box-shadow: 0 5px 5px -5px #333 inset;
}

meter::-webkit-meter-bar {
  
  background: none; /* Important to get rid of default background. */
  background-color: whiteSmoke;
  
  box-shadow: 0 5px 5px -5px #333 inset;
}

meter::-webkit-meter-optimum-value {
  
  transition: width .5s;
  box-shadow: 0 5px 5px -5px #999 inset;
  
  background-image: linear-gradient( 90deg, 
                                     #8bcf69 5%, 
                                     #e6d450 5%,
                                     #e6d450 15%,
                                     #f28f68 15%,
                                     #f28f68 55%,
                                     #cf82bf 55%,
                                     #cf82bf 95%,
                                     #719fd1 95%,
                                     #719fd1 100%);
  
  background-size: 100% 100%;
}

meter::-webkit-meter-optimum-value:hover {
  
  background-image: linear-gradient( 90deg, 
                                     #8bcf69 20%, 
                                     #e6d450 20%,
                                     #e6d450 40%,
                                     #f28f68 40%,
                                     #f28f68 60%,
                                     #cf82bf 60%,
                                     #cf82bf 80%,
                                     #719fd1 80%,
                                     #719fd1 100%);
  
  transition: width .5s;
  width: 100% !important; /* !important keyword used to override the inline style in ebkit browsers. */
}

meter::-moz-meter-bar {
  
  box-shadow: 0 5px 5px -5px #999 inset;
  
  background-image: linear-gradient( 90deg, 
                                     #8bcf69 5%, 
                                     #e6d450 5%,
                                     #e6d450 15%,
                                     #f28f68 15%,
                                     #f28f68 55%,
                                     #cf82bf 55%,
                                     #cf82bf 95%,
                                     #719fd1 95%,
                                     #719fd1 100%);
  
  background-size: 100% 100%;
}

p {
 
  margin: 0 auto ;
  width: 550px;
  line-height: 2.5;
}

.free-space {
  
  float: right;
}

.swatch {
  
  margin: 0; padding:0;
  margin: 5em auto;
  list-style-type: none;
  width: 550px;
  display: block;
  position: relative;
}

.swatch::before {
  
  content: '';
  width: 100%;
  height: 10px;
  outline: 0px solid #000;
  position: absolute;
  top: -20px;
  left: 0;
  border-radius: 2px;
  
  background-image: linear-gradient( 90deg, 
                                     #8bcf69 20%, 
                                     #e6d450 20%,
                                     #e6d450 40%,
                                     #f28f68 40%,
                                     #f28f68 60%,
                                     #cf82bf 60%,
                                     #cf82bf 80%,
                                     #719fd1 80%,
                                     #719fd1 100%);

}

.swatch__elem {
  
  outline: 0px solid #c00;
  float: left;
  width: 110px;
  padding-left: 5px;

  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

.used-space {
  
  display: block;
  line-height: 2;
  font-size: 85%;
  color: #666;
}

.meter-gauge {

    border: 1px solid #ccc;
    border-radius: 3px;

    background-color: whiteSmoke;
    box-shadow: 0 5px 5px -5px #333 inset;

    width: 550px;
    height: 25px;
    
    display: block;
}
  
.meter-gauge > span {
 
  height: inherit;  
  box-shadow: 0 5px 5px -5px #999 inset;
  
  background-color: blue;
  background-image: linear-gradient( 90deg, 
                                     #8bcf69 5%, 
                                     #e6d450 5%,
                                     #e6d450 15%,
                                     #f28f68 15%,
                                     #f28f68 55%,
                                     #cf82bf 55%,
                                     #cf82bf 95%,
                                     #719fd1 95%,
                                     #719fd1 100%);
  
  background-size: 100% 100%;

  display: block;
  text-indent: -9999px;
}
            
          
!
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.
Loading ..................

Console