CSS- 선택자

핫다리·2023년 3월 13일
0

프론트

목록 보기
5/7

A = Type Selector
#id : id를 대상, ID Selector
A B = Descendant Selector
#id A = Combine the Descendant & ID Selectors
.classname = class 선택자, Class Selector
A.className = Combine the Class Selector


A, B = Comma Combinator

  • = 자식 요소 전체, The Universal Selector
    A * = Combine the Universal Selector
    A + B = 앞의 요소 바로 뒤에 있는 요소만 선택, Adjacent Sibling Selector
    A ~ B = General Sibling Selector
    A > B = A안에 B를 선택, Child Selector
    :first-child = First Child Pseudo-selector
    :only-child = Only Child Pseudo-selector
    :last-child = Last Child Pseudo-selector
    :nth-child(A)= Nth Child Pseudo-selector
    :nth-last-child(A) = Nth Last Child Selector
    :first-of-type = First of Type Selector

:nth-of-type(A) = Nth of Type Selector
:nth-of-type(An+B) = Nth-of-type Selector with Formula
:only-of-type = Only of Type Selector
:last-of-type = Last of Type Selector
:empty = Empty Selector
:not(X) = Negation Pseudo-class

[attribute] = Attribute Selector
A[attribute] = Attribute Selector
[attribute="value"] = Attribute Value Selector
[attribute^="value"] = Attribute Starts With Selector
[attribute$="value"] = Attribute Ends With Selector
[attribute*="value"] = Attribute Wildcard Selector

연습
https://flukeout.github.io/

profile
일단 만들고 본다

0개의 댓글