Skip to content

:where()

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

css
:where(header, main, footer) p:hover {
  color: red;
  cursor: pointer;
}

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