diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/_doublecolon_-webkit-progress-value | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/css/_doublecolon_-webkit-progress-value')
-rw-r--r-- | files/zh-cn/web/css/_doublecolon_-webkit-progress-value/index.html | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/_doublecolon_-webkit-progress-value/index.html b/files/zh-cn/web/css/_doublecolon_-webkit-progress-value/index.html new file mode 100644 index 0000000000..af7bd3b5bd --- /dev/null +++ b/files/zh-cn/web/css/_doublecolon_-webkit-progress-value/index.html @@ -0,0 +1,67 @@ +--- +title: '::-webkit-progress-value' +slug: 'Web/CSS/::-webkit-progress-value' +tags: + - CSS + - 伪元素 + - 参考 + - 非标准 +translation_of: 'Web/CSS/::-webkit-progress-value' +--- +<div>{{CSSRef}}{{Non-standard_header}}</div> + +<div><strong><code>::-webkit-progress-value</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> <a href="/en-US/docs/Web/CSS/Pseudo-elements">伪元素</a> 代表的是{{HTMLElement("progress")}} 元素中进度条未完成的部分。它是{{cssxref("::-webkit-progress-bar")}} 伪元素的子元素。</div> + +<div></div> + +<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> + +<p>不属于任何规范。这是WebKit/Blink专有的一个伪元素。</p> + +<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-value { + background-color: orange; +}</pre> + +<h3 id="Result">Result</h3> + +<p>{{EmbedLiveSample("Example", 200, 50)}}</p> + +<p>应用了上述样式的进度条如下:</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13490/progress-value.png" style="height: 60px; width: 249px;"></p> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("css.selectors.-webkit-progress-value")}}</p> + +<h2 id="参见">参见</h2> + +<ul> + <li>WebKit/Blink使用的用来修改{{HTMLElement("progress")}}元素其他部分样式的伪元素: + <ul> + <li>{{ cssxref("::-webkit-progress-bar") }}</li> + <li>{{ cssxref("::-webkit-progress-inner-element") }}</li> + </ul> + </li> + <li>{{ cssxref("::-moz-progress-bar") }}</li> + <li>{{ cssxref("::-ms-fill") }}</li> +</ul> |