티스토리 뷰
호버, 액티브, 포커스 정리하자
호버로 했을 때 겹치는 영역이 있으면 밑에 영역에 속하게해서 안바뀌게함
Pseudo-classes
- A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s).
- 클래스 이름:수도 클래스() 형식(인자가 있는 수도 클래스는 괄호가 있음)
너무 많아서 일단 배운 것만 했다. 나중에 다 차차 써먹으면서 채워갈 것임.
Element display state pseudo-classes
- 디스플레이 상태에 따라
1. :fullscreen : 풀 스크인 모드일 때
Input pseudo-classes
- form과 관련된, 인터렉션 전후의 필드 상태에 따라
Linguistic pseudo-classes
-
Location pseudo-classes
-
Resource state pseudo-classes
-
Time-dimensional pseudo-classes
-
Tree-structural pseudo-classes
- 도큐먼트 트리 안의 요소의 위치에 따라
1. :nth-of-type() : n번째 요소
:nth-of-type(<An+B> | even | odd) {
/* ... */
}
/* First paragraph */
p:nth-of-type(1) {
font-weight: bold;
}
/* Odd paragraphs */
p:nth-of-type(2n + 1) {
color: red;
}
dd:nth-of-type(even) {
border: 2px solid orange;
}
- :nth-last-of-type
- :first-of-type
User action pseudo-classes
-
Functional pseudo-classes
-
+ in relation to : 관련하여
++
[출처] https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
Pseudo-classes - CSS: Cascading Style Sheets | MDN
A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). For example, the pseudo-class :hover can be used to select a button when a user's pointer hovers over the button and this selected button can the
developer.mozilla.org
https://developer.mozilla.org/ko/docs/Web/CSS/:hover
:hover - CSS: Cascading Style Sheets | MDN
:hover CSS 의사 클래스는 사용자가 포인팅 장치를 사용해 상호작용 중인 요소를 선택합니다. 보통 사용자의 커서(마우스 포인터)가 요소 위에 올라가 있으면 선택됩니다.
developer.mozilla.org
https://developer.mozilla.org/ko/docs/Web/CSS/:active
:active - CSS: Cascading Style Sheets | MDN
:active CSS 의사 클래스는 사용자가 활성화한 요소(버튼 등)를 나타냅니다. 마우스를 사용하는 경우, "활성"이란 보통 마우스 버튼을 누르는 순간부터 떼는 시점까지를 의미합니다.
developer.mozilla.org
https://developer.mozilla.org/ko/docs/Web/CSS/:focus
:focus - CSS: Cascading Style Sheets | MDN
CSS :focus 의사 클래스는 양식의 입력 칸 등 포커스를 받은 요소를 나타냅니다. 보통 사용자가 요소를 클릭 또는 탭하거나, 키보드 Tab 키로 선택했을 때 발동합니다.
developer.mozilla.org
'CSS' 카테고리의 다른 글
| [CSS] Flexbox (0) | 2024.07.22 |
|---|---|
| [CSS] Grid (0) | 2024.07.19 |
| [CSS] 4. position (0) | 2024.07.18 |
| [CSS] 2. Attribute selectors(속성 선택자) (0) | 2024.07.18 |
| [CSS] 1. 기초 (0) | 2024.07.17 |