Css 如何组合两个:not()s?

Css 如何组合两个:not()s?,css,css-selectors,Css,Css Selectors,我正在尝试这样做: :not(h1) > a, :not(figure) > a { background: #859900; } 但它不起作用,因为figure>a捕获:not(h1)>a和h1>a捕获:not(figure)>a。如何组合这些选项?使用此选项,可以组合多个:not()选择器: :not(h1):not(图)>a{ 背景#859900; } 组合两个:not()选择器,就像.class-a和的选择器一样。class-b是。class-a.class-b

我正在尝试这样做:

:not(h1) > a,
:not(figure) > a {
    background: #859900;
}

但它不起作用,因为
figure>a
捕获
:not(h1)>a
h1>a
捕获
:not(figure)>a
。如何组合这些选项?

使用此选项,可以组合多个
:not()
选择器:

:not(h1):not(图)>a{
背景#859900;
}

组合两个
:not()
选择器,就像
.class-a
的选择器一样。class-b
。class-a.class-b

:not(h1):not(图)>a{
颜色:红色;
}
测试
试验

试验