개념
:not
선택자를 반대로 적용
예제 1
<!DOCTYPE html>
<html>
<head>
<title>CSS3 Selector Basic</title>
<style>
/* input 태그 중 type 속성이 password가 아닌 태그의 background 속성에 red 키워드 적용 */
input:not([type=password]) {
background: red;
}
</style>
</head>
<body>
<input type="password" />
<input type="text" />
<input type="password" />
<input type="text" />
</body>
</html>

'HTML > Day39' 카테고리의 다른 글
| [HTML] em과 rem (0) | 2022.01.02 |
|---|---|
| [HTML] float 속성 & clear 속성 & overflow 속성 (0) | 2022.01.02 |
| [HTML] 링크 선택자 (0) | 2022.01.02 |
| [HTML]문자 선택자 (0) | 2022.01.02 |
| [HTML] 동위 선택자 (0) | 2022.01.02 |