aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/_colon_where
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/_colon_where
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/_colon_where')
-rw-r--r--files/zh-cn/web/css/_colon_where/index.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/_colon_where/index.html b/files/zh-cn/web/css/_colon_where/index.html
new file mode 100644
index 0000000000..207deb2f6f
--- /dev/null
+++ b/files/zh-cn/web/css/_colon_where/index.html
@@ -0,0 +1,54 @@
+---
+title: ':where()'
+slug: 'Web/CSS/:where'
+tags:
+ - CSS
+ - Web
+ - 伪类
+ - 参考
+ - 选择器
+translation_of: 'Web/CSS/:where'
+---
+<p>{{CSSRef}}{{Draft}}{{SeeCompatTable}}</p>
+
+<p><strong><code>:where()</code></strong> <a href="/zh-CN/docs/Web/CSS/Pseudo-classes">CSS 伪类</a>函数接受<a href="/zh-CN/docs/Web/CSS/Selector_list">选择器列表</a>作为它的参数,将会选择所有能被该选择器列表中任何一条规则选中的元素。</p>
+
+<p><code>:where()</code> 和 {{CSSxRef(":is", ":is()")}} 的不同之处在于,<code>:where()</code> 的<a href="/zh-CN/docs/Web/CSS/Specificity">优先级</a>总是为 0 ,但是 <code>:is()</code> 的优先级是由它的选择器列表中优先级最高的<a href="/zh-CN/docs/Glossary/CSS_Selector">选择器</a>决定的。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">{{CSSSyntax}}</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">备注</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("CSS4 Selectors", "#zero-matches", ":where()")}}</td>
+ <td>{{Spec2("CSS4 Selectors")}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<div>
+
+
+<p>{{Compat("css.selectors.where")}}</p>
+</div>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{CSSxRef(":is", ":is()")}} {{Experimental_Inline}}</li>
+ <li><a href="/zh-CN/docs/Web/CSS/Selector_list">选择器列表</a></li>
+</ul>