พีวดโอคลาส not

พีวดโอคลาส not กำหนดการปฏิเสธ ตัวอย่างเช่น p:not(.last) หมายถึง เลือก ย่อหน้าทั้งหมดที่ไม่มีคลาส last not ที่ซ้อนกันไม่ทำงาน

ไวยากรณ์

cssselector:not(negation) {
  
}

ตัวอย่าง

ทำให้ li ทั้งหมดเป็นสีแดง ยกเว้นตัวแรก:

html<ul>
  <li>list item</li>
  <li>list item</li>
  <li>list item</li>
  <li>list item</li>
  <li>list item</li>
</ul>
cssli:not(:first-child) {
  color: red;
}

Результат: