blob: 65765175ac92bfc29c3d40788146db35cf8eb104 (
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
55
56
57
58
59
60
61
62
63
64
65
|
---
title: '::-webkit-progress-inner-element'
slug: 'Web/CSS/::-webkit-progress-inner-element'
tags:
- CSS
- 伪元素
- 非标准
translation_of: 'Web/CSS/::-webkit-progress-inner-element'
---
<div>{{CSSRef}}{{Non-standard_header}}</div>
<p><strong><code>::-webkit-progress-inner-element</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> 伪元素选择了 {{HTMLElement("progress")}} 元素。他是 {{cssxref("::-webkit-progress-bar")}} 伪元素的父元素。</p>
<div class="note">
<p><strong>注意:</strong> 为了使 <code>::-webkit-progress-value</code> 生效, <code><progress></code> 元素的{{cssxref("-webkit-appearance")}} 需要设置为 <code>none</code> 。</p>
</div>
<h2 id="例子">例子</h2>
<h3 id="HTML">HTML</h3>
<pre class="brush: html notranslate"><progress value="10" max="50">
</pre>
<h3 id="CSS">CSS</h3>
<pre class="brush: css notranslate">progress {
-webkit-appearance: none;
}
::-webkit-progress-inner-element {
border: 2px solid black;
}
</pre>
<h3 id="Result">Result</h3>
<p>{{EmbedLiveSample("Example", 200, 50)}}</p>
<p>应用了上述样式的进度条如下:</p>
<p><img alt="" src="https://mdn.mozillademos.org/files/13492/-webkit-progress-inner-element%20example.png"></p>
<h2 id="规范">规范</h2>
<p>不属于任何规范。这是WebKit/Blink专有的一个伪元素。</p>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("css.selectors.-webkit-progress-inner-element")}}</p>
<h2 id="参考">参考</h2>
<ul>
<li>The pseudo-elements used by WebKit/Blink to style other parts of a {{HTMLElement("progress")}} element:
<ul>
<li>{{cssxref("::-webkit-progress-bar")}}</li>
<li>{{cssxref("::-webkit-progress-value")}}</li>
</ul>
</li>
<li>{{cssxref("::-moz-progress-bar")}}</li>
<li>{{cssxref("::-ms-fill")}}</li>
</ul>
|