How to set color for CSS3 html5 progress element?

前端 未结 3 2039
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 06:04

Is it possible to set the color of the \"bar\" for the element in HTML5 (when you specify a value, the bar is filled up to the point of the value)? If so, how? background-c

3条回答
  •  春和景丽
    2020-12-14 06:41

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

    In Firefox, you can use the following:

    progress::-moz-progress-bar { background: blue; }
    

    In Chrome or Safari, you can use:

    progress::-webkit-progress-value { background: blue; }
    

    In IE10, you just need to use the color attribute:

    progress { color: blue; }
    

    Source: http://html5doctor.com/the-progress-element/

提交回复
热议问题