blob: 0af0760b0484dadd4b8adff99a1ac694b70bff0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
---
title: '::-moz-progress-bar'
slug: 'Web/CSS/::-moz-progress-bar'
tags:
- CSS
- CSS 伪类
- 非标准特性
translation_of: 'Web/CSS/::-moz-progress-bar'
---
<div>{{CSSRef}}{{Non-standard_header}}</div>
<p><a href="/en-US/docs/Web/CSS">CSS</a><a href="/en-US/docs/Web/CSS/Pseudo-elements">伪元素</a> <strong><code>::-moz-progress-bar</code></strong> 是{{HTMLElement("progress")}} 元素中,Mozilla独有的特性(<a href="/en-US/docs/Web/CSS/Mozilla_Extensions">Mozilla extension</a>),用于对进度条完成的部分进行选择。</p>
<p>如果你想选择未完成的部分,请直接选择 {{HTMLElement("progress")}} 。</p>
<h2 id="语法">语法</h2>
{{csssyntax}}
<h2 id="例子">例子</h2>
<h3 id="HTML">HTML</h3>
<pre class="brush:html; notranslate"><progress value="30" max="100">30%</progress>
<progress max="100">Indeterminate</progress></pre>
<h3 id="CSS">CSS</h3>
<pre class="brush: css notranslate">::-moz-progress-bar {
background-color: red;
}
/* Force indeterminate bars to have zero width */
:indeterminate::-moz-progress-bar {
width: 0;
}</pre>
<h3 id="Result">Result</h3>
<p>{{EmbedLiveSample('Examples')}}</p>
<p>上面第一段样式的进度条会如下图所示:</p>
<p><img alt="Custom styled progress bar" class="default internal" src="/@api/deki/files/5387/=redbar.png"></p>
<h2 id="参考">参考</h2>
<ul>
<li>{{HTMLElement("progress")}}</li>
<li>{{ cssxref("::-ms-fill") }}</li>
<li>{{ cssxref("::-webkit-progress-bar") }}</li>
<li>{{ cssxref("::-webkit-progress-value") }}</li>
<li>{{ cssxref("::-webkit-progress-inner-element") }}</li>
</ul>
|