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

              
                <ul>
  <!-- Barra 1: Normal -->
  <li>
    <progress max="100" value="80"></progress>
  </li>
  <!-- Barra 2: Reset -->
  <li>
    <progress max="100" value="80" class="default"></progress>
  </li>
  <!-- Barra 3: Colorear -->
  <li>
    <progress max="100" value="70" class="colorear"></progress>
  </li>
  <!-- Barra 4: Sombra -->
  <li>
    <progress max="100" value="60" class="shadow"></progress>
  </li>
  <!-- Barra 5: Franjas -->
  <li>
    <progress max="100" value="70" class="stripes"></progress>
  </li>
  <!-- Barra 6: Animado -->
  <li>
    <progress max="100" value="80" class="animated"></progress>
  </li>
</ul>

<p><a href="http://www.monchito.net/tutorial-html5-barras-de-progreso/">Artículo en www.monchito.net</a></p>
              
            
!

CSS

              
                /* Formato básico */

* { 
	margin:0; padding:0; 
	box-sizing: border-box;
  margin-left: 0.2em;
}

body {
  margin: 20px auto 0;
  max-width: 960px;
  font-family: sans-serif;
}

li {
	float: left;
	list-style-type: none;
  width:32%;
  padding-bottom: 2.5em;
}

/* Formato general barras */

progress[value] {
  width: 250px;
  height: 20px;
}

/* Reinicializar estilos */
/* Para todas las barras excepto la primera */

progress[value].default,
progress[value].colorear,
progress[value].shadow,
progress[value].stripes,
progress[value].animated {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
}

/* Barra 3: Color de fondo */

progress[value].colorear::-webkit-progress-bar {
  background-color: gold;
}

/* Barra 3: Color de barra de valores */

progress[value].colorear::-webkit-progress-value {
  background-color: darkred;
}

/* Barra 3: CSS para Firefox */
/* En Firefox se utiliza una pseudo clase (-moz-progress-bar) para darle formato al elemento de progreso, pero no para el contenedor */

progress[value].colorear::-moz-progress-bar {
  background-color: darkred;
}

.colorear {
  background-color: gold;
}

/* Barra 3: CSS para IE10 */
progress[value].colorear {
  color: darkred;
}


/* Barra 4: Sombra en fondo */

progress[value].shadow::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
}

progress[value].shadow::-webkit-progress-value {
  background-color: darkred;
}

/* Barra 4: Sombra en fondo Firefox */

.shadow {
  background-color: #eee;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
}

progress[value].shadow::-moz-progress-bar {
  background-color: darkred;
}

/* Barra 5: Franjas */

progress[value].stripes::-webkit-progress-value {
  background-color: darkblue;
  background-image: -webkit-repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,255,255,.5) 10px, rgba(255,255,255,.5) 20px);
}

progress[value].stripes::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
}

/* Barra 5: Franjas Firefox */

progress[value].stripes::-moz-progress-bar {
  background-color: darkblue;
  background-image: -moz-repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,255,255,.5) 10px, rgba(255,255,255,.5) 20px);
}

.stripes {
  background-color: #eee;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
}

/* Barra 6: Animado */
/* Nota: Animaciones no funcionan en Firefox */

progress[value].animated::-webkit-progress-value {
  background-color: darkblue;
  background-image: -webkit-repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,255,255,.5) 10px, rgba(255,255,255,.5) 20px);
  background-size: 28px 20px, 100% 100%, 100% 100%;
  -webkit-animation: animate-stripes 5s linear infinite;
}

@-webkit-keyframes animate-stripes {
   100% { background-position: -112px 0px; }
}

progress[value].animated::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
}

              
            
!

JS

              
                
              
            
!
999px

Console