css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <progress min="0" max="100"></progress>
<progress min="0" max="100" value="15"></progress>
<progress min="0" max="100" value="30" class="progress-success"></progress>
<progress min="0" max="100" value="45" class="progress-info"></progress>
<progress min="0" max="100" value="60" class="progress-primary"></progress>
<progress min="0" max="100" value="75" class="progress-warning"></progress>
<progress min="0" max="100" value="90" class="progress-danger"></progress>
            
          
!
            
              $progress-inner-shadow: 2px 2px 3px rgba(0,0,0,.5) inset;
$progress-border-radius: 3px;
$progress-height: 20px;
$progress-background-color: whitesmoke;
$progress-indeterminate-speed: .5s;
$progress-margin-bottom: 10px;

@mixin progress-style() {
  position: relative;
  display: block;
  width: 100%;
  height: $progress-height;
  border: none;
  background-color: $progress-background-color;
  border-radius: $progress-border-radius;
  box-shadow: $progress-inner-shadow;
  
  /*
  the background-image appears only in
  the indeterminate state, being overridden
  when there's a value in the progress
  */
  background-image: url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSdsaWdodGdyYXknIGhlaWdodD0nMjAnIHdpZHRoPSczNScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz48cGF0aCBkPSdNMCAyMCBMMTcgMCBIMzUgTDE3IDIwIFonLz48L3N2Zz4="); // for browsers that does not support linear-gradient
  background-image: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, .1) 33%, rgba(0,0, 0, .1) 66%, transparent 66%); // for browsers that does not support svg backgrounds
  background-size: 35px $progress-height;
  animation-name: animate-indeterminate;
  animation-duration: $progress-indeterminate-speed;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@mixin progress-color($color) {
  color: $color; // IE progress value color
  &::-webkit-progress-value {
    background-color: $color;
  }
  &::-moz-progress-bar {
    background-color: $color;
  }
}
progress {
  @include progress-style();
  margin-bottom: $progress-margin-bottom;
  
  /*
  for old browsers that does not
  support the progress element at all
  */
  &:before {
    content: ''; // value / max will appear if a value is set
    line-height: $progress-height;
    color: black;
    text-align: center;
    @include progress-style();
  }
  &::-webkit-progress-bar, &::before {
    /*
    Webkit supports ::before on the
    progress, we need to remove it
    */
    display: none;
  }
  
  &::-ms-fill {
    animation-name: none; // remove default dot animation on IE
  }
  &::-webkit-progress-bar, &::after {
    /*
    this creates an animated overlay on webkit
    with progress:after styles here applied to
    ::-webkit-progress-bar will be reset later
    */
    @include progress-style();
    content: '';
    position: absolute;
    top: 0px;
    background-color: transparent;
    box-shadow: none;
  }
  &::-webkit-progress-bar {
    @include progress-style();
    background-image: none;
  }
  &::-moz-progress-bar {
    @include progress-style();
  }
  &[value] {
    background-image: none;
    &:before {
      content: attr(value)' / 'attr(max);
    }
    @include progress-color(gray);
    &::-ms-fill {
      box-shadow: $progress-inner-shadow;
      border: none;
      border-radius: $progress-border-radius;
    }
    &::-webkit-progress-bar, &::after {
      background-image: none;
    }
    &::-webkit-progress-value {
      /*
      the inner shadow applied to the
      progress element and the ::-webkit-progress-bar
      is bellow the ::-webkit-progress-value
      (in other browsers it's above, so no need to set it again)
      */
      box-shadow: $progress-inner-shadow;
      border-radius: $progress-border-radius;
    }
    &::-moz-progress-bar {
      background-image: none;
    }
    &.progress-success {
      @include progress-color(green);
    }
    &.progress-info {
      @include progress-color(lightblue);
    }
    &.progress-primary {
      @include progress-color(blue);
    }
    &.progress-warning {
      @include progress-color(orange);
    }
    &.progress-danger {
      @include progress-color(red);
    }
  }
}
@keyframes animate-indeterminate {
  from { background-position-x: 0px }
  to { background-position-x: 35px }
}
            
          
!
            
              /*
Based on the blog post at 
https://css-tricks.com/html5-progress-element/

That's what I've done:
  - added automatic fallback to browsers that does not support the progress element (https://caniuse.com/#feat=progress)
  - added indeterminated animation support for webkit (with the ::after overlay trick)
  - added svg background fallback to browsers that does not support linear-gradient (https://caniuse.com/#feat=svg-css and https://caniuse.com/#feat=css-gradients)
*/
            
          
!
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