반응형

선택자 (Selector)

 

1. 기본 선택자

  • *(전체 선택자 : 초기에 한 번 정도 사용)
  • div(요소 선택자)
  • .(클래스 선택자)
  • #(아이디 선택자)
  • [attr](특성 또는 속성 선택자)

 

2. 그룹 선택자 : ,

 

3. 결합자

  •  (자손 결합자)
  • >(자식 결합자)
  • ~(일반 형제 결합자)
  • +(인접 형제 결합자)

 

4. 가상 클래스 선택자

  • :hover, :focus, : focus-visible, :active, :checked, : disable, :not()
  • :first-child, :last-child, :nth-child, :only-child

 

5. 가상 요소 선택자

  • ::before, ::after, ::placeholder

 


 

반응형

+ Recent posts