From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/_colon_where/index.html | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 files/zh-cn/web/css/_colon_where/index.html (limited to 'files/zh-cn/web/css/_colon_where') 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' +--- +

{{CSSRef}}{{Draft}}{{SeeCompatTable}}

+ +

:where() CSS 伪类函数接受选择器列表作为它的参数,将会选择所有能被该选择器列表中任何一条规则选中的元素。

+ +

:where() 和 {{CSSxRef(":is", ":is()")}} 的不同之处在于,:where()优先级总是为 0 ,但是 :is() 的优先级是由它的选择器列表中优先级最高的选择器决定的。

+ +

语法

+ +
{{CSSSyntax}}
+ +

规范

+ + + + + + + + + + + + + + + + +
规范状态备注
{{SpecName("CSS4 Selectors", "#zero-matches", ":where()")}}{{Spec2("CSS4 Selectors")}}Initial definition.
+ +

浏览器兼容性

+ +
+ + +

{{Compat("css.selectors.where")}}

+
+ +

参见

+ + -- cgit v1.2.3-54-g00ecf