Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any possibility to color the html5 progress tag?

Tags:

html

css

Is there any possibility to color the progress tag in css? I tried it. But only width and height is working. I want to skin the color of progression (inner color which shows the percentage of download). Is it possible?

like image 602
priya Avatar asked Feb 16 '11 11:02

priya


People also ask

How do I change the color of my HTML progress?

You can style the color of the bar in the <progress> element by changing the background of a few browser-proprietary selectors.

How do you style a progress tag in HTML?

WebKit/Blink provides two pseudo classes to style the progress element: -webkit-progress-bar is the pseudo class that can be used to style the progress element container. In this demo we'll change the background color, border-radius and then apply inset box shadow to the progress element container.

How do you show progress in HTML?

<progress>: The Progress Indicator element. The <progress> HTML element displays an indicator showing the completion progress of a task, typically displayed as a progress bar.

Can I use progress tag?

Tips and Notes. Tip: Use the <progress> tag in conjunction with JavaScript to display the progress of a task. Note: The <progress> tag is not suitable for representing a gauge (e.g. disk space usage or relevance of a query result). To represent a gauge, use the <meter> tag instead.


2 Answers

This is what you are looking for:

progress[value] {color:red} /* IE10 */ progress::-webkit-progress-bar-value {background:red} progress::-webkit-progress-value {background:red} progress::-moz-progress-bar {background:red} 

It's working just fine on Chrome and Firefox 6.
IE10 also supports the ::-ms-fill pseudo-element.

like image 100
Knu Avatar answered Sep 20 '22 11:09

Knu


Currently no. The design/look-and-feel of the progress bar is currently defined by the browser and CSS cannot style the progress bar.

My current solution to this is to use multiple divs to style and show a progress bar, using CSS sprite images.

like image 25
mauris Avatar answered Sep 19 '22 11:09

mauris