I'm using the element and I've found good instructions on [styling] (http://html5doctor.com/the-progress-element/).
I'd like to have more than one progress bar on a page and I'd like them to have different fill/value colors. Is this possible? Can I do this by tweaking my CSS? Or an I better off rolling my own? Thanks!
.current-roll {
-webkit-appearance: none;
width: 80%;
height: 25px;
/* next line does nothing */
color: #f7a700
}
.previous-roll {
-webkit-appearance: none;
width: 80%;
height: 25px;
/* next line does nothing */
color: #98c11e
}
progress::-webkit-progress-bar {
background: #d8d8d8;
}
progress::-webkit-progress-value {
background: #f7a700;
}
<p>Orange bar</p>
<progress class="current-roll" value="0.5"></progress>
<p>Green bar</p>
<progress class="previous-roll" value="0.75"></progress>
progress::-webkit-progress-value
is what changes the progress bar color.
Example
progress.current-roll::-webkit-progress-value {
background: #f7a700;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With