-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
69 lines (45 loc) · 1.74 KB
/
index.md
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: "::-webkit-progress-bar"
slug: Web/CSS/::-webkit-progress-bar
page-type: css-pseudo-element
status:
- non-standard
browser-compat: css.selectors.-webkit-progress-bar
---
{{CSSRef}}{{Non-standard_header}}
The **`::-webkit-progress-bar`** [CSS](/en-US/docs/Web/CSS) [pseudo-element](/en-US/docs/Web/CSS/Pseudo-elements) represents the entire bar of a {{HTMLElement("progress")}} element. Normally it's only visible as the unfilled portion of the bar, since by default it's rendered below the {{ cssxref("::-webkit-progress-value") }} pseudo-element. It is a child of the {{cssxref("::-webkit-progress-inner-element")}} pseudo-element and the parent of the {{cssxref("::-webkit-progress-value")}} pseudo-element.
> **Note:** For `::-webkit-progress-value` to take effect, {{cssxref("appearance")}} needs to be set to `none` on the `<progress>` element.
## Syntax
```css
::-webkit-progress-bar {
/* ... */
}
```
## Examples
### CSS
```css
progress {
-webkit-appearance: none;
}
::-webkit-progress-bar {
background-color: orange;
}
```
### HTML
```html
<progress value="10" max="50"></progress>
```
### Result
{{EmbedLiveSample("Examples", 200, 50)}}
### Result screenshot
The code above results in a progress bar that looks like this when using a WebKit or Blink browser:
![The progress bar is a horizontal bar about the height of a letter. The left 20% is green. The right 80% is orange.](progress-bar.png)
## Specifications
Not part of any standard.
## Browser compatibility
{{Compat}}
## See also
- The pseudo-elements used by WebKit/Blink to style other parts of a {{HTMLElement("progress")}} element:
- {{ cssxref("::-webkit-progress-value") }}
- {{ cssxref("::-webkit-progress-inner-element") }}
- {{ cssxref("::-moz-progress-bar") }}