부정 가상 선택
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>부정선택자</title> <style> /* li중에 one이 아닌 것은 red! */ li:not(.one) { color: red;} </style> </head> <body> <ul> <!-- ul>li.one*5 --> <li class="one">hello</li> <li class="one">hello</li> <li class="two">hello</li> <li class="one">hello</li> <li class="one">hello</li> </ul> </body> </html>