--- title: '::-moz-progress-bar' slug: 'Web/CSS/::-moz-progress-bar' tags: - CSS - CSS 伪类 - 非标准特性 translation_of: 'Web/CSS/::-moz-progress-bar' ---
CSS伪元素 ::-moz-progress-bar 是{{HTMLElement("progress")}} 元素中,Mozilla独有的特性(Mozilla extension),用于对进度条完成的部分进行选择。
如果你想选择未完成的部分,请直接选择 {{HTMLElement("progress")}} 。
<progress value="30" max="100">30%</progress> <progress max="100">Indeterminate</progress>
::-moz-progress-bar {
background-color: red;
}
/* Force indeterminate bars to have zero width */
:indeterminate::-moz-progress-bar {
width: 0;
}
{{EmbedLiveSample('Examples')}}
上面第一段样式的进度条会如下图所示:
