Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- html tag i
- height속성
- sup태그
- width속성
- Checked 의사 클래스
- html 태그
- RGBA
- tag html
- 인접 형제 결합자
- br 태그
- sub태그
- focus 의사클래스
- padding 속성
- 일반 형제 결합자
- css
- i 태그
- Live Server
- iframe
- 자식결합자
- id 선택자
- 임베디드
- RGB
- html
- background-color 속성
- go live
- not 의사클래스
- 전체 선택자
- iframe 태그
- 아두이노
- reveal in file explorer
Archives
- Today
- Total
so woon!
[의사 클래스] Not 의사 클래스(Pseudo Class) 본문
학습일 : 2022. 09. 05
Not 의사 클래스
Not 의사 클래스(Pseudo Class)는 다른 의사 클래스를 부정하기 위해 사용한다.
다음과 같이 작성한다. ("는 없는 것으로 한다.)
"선택자":not(:"다른 의사 클래스") {
"속성" : "속성 값";
"속성" : "속성 값";
"속성" : "속성 값";
}
가령, 마지막 요소가 아닌 모든 요소는 다음과 같이 선택한다.
*:not(:last-child) { . . . }
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>not 의사 클래스</title>
<style>
body > div > div:not(:last-child)❤ {
background-color: red;
border-bottom: 0.0625rem solid black;
}
</style>
</head>
<body>
<div>
<div>냉장고</div>
<div>청소기</div>
<div>세탁기</div>
<div>건조기</div>
<div>TV</div>
</div>
</body>
</html>
===========실행결과==========
'CSS > 개념정리' 카테고리의 다른 글
[속성] color 속성 (0) | 2022.09.07 |
---|---|
[속성] background-image 외 속성들 (0) | 2022.09.07 |
[의사 클래스] Focus 의사 클래스(Pseudo Class) (0) | 2022.09.07 |
[의사 클래스] first-of-type 및 nth-of-type, last-of-type 의사 클래스 (0) | 2022.09.07 |
[의사 클래스] first-child 및 nth-child, last-child 의사 클래스 (0) | 2022.09.07 |
Comments