progress {
border: none;
width: 400px;
height: 60px;
background: crimson;
}
progress {
color: lightblue;
}
progress::-webkit-progress-value {
background: lightblue;
}
progress::-moz-progress-bar {
background: lightcolor;
}
<div>
<progress min="0" max="100" value="63" />
</div>
我几乎尝试了所有方法,但进度条的值颜色保持不变。唯一响应更改的浏览器是 IE。 Firefox 只允许更改背景颜色。 Chrome 根本不显示任何内容。你能发现我的代码有什么问题吗?
最佳答案
progress {
border: none;
width: 400px;
height: 60px;
background: crimson;
}
progress {
color: lightblue;
}
progress::-moz-progress-bar {
background: lightcolor;
}
progress::-webkit-progress-value {
background: red;
}
progress::-webkit-progress-bar {
background: blue;
}
It will work on webkit browser, like this example
<div>
<progress min="0" max="100" value="63" />
</div>
关于css - 如何更改 HTML 中进度条值的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45507970/