首页javascriptclassjQuery Selector - 如何忽略css类

jQuery Selector - 如何忽略css类

我们想知道如何忽略css类。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.red:not (.yellow ) {
  color: red;
}

.yellow {
  background-color: yellow;
}
</style>
</head>
<body>
  <div class="red yellow">Glee's awesome!</div>
  <div class="red">Glee's awesome!</div>
</body>
</html>