没有类的CSS选择器

Leg*_*nar 5 css css3

我使用选择器来选择没有一个类的所有元素:

.list th:not(.foo) {
  /* some rules */
}
Run Code Online (Sandbox Code Playgroud)

如何将其应用于多个课程?

.list th:not(.foo), .list th:not(.bar) {
  /* some rules */
}
Run Code Online (Sandbox Code Playgroud)

上面的CSS当然不会这样做,我需要像这样的伪:

.list th:not(.foo and .bar)
Run Code Online (Sandbox Code Playgroud)

CSS中有可能吗?

Que*_*tin 5

您可以根据需要使用任意数量的:not()选择器。

:not(.foo):not(.bar)
Run Code Online (Sandbox Code Playgroud)