Selector
-
[css] SelectorcodeStates front-end/Css 2023. 1. 4. 10:04
기본 셀렉터 * { } // 전체 셀렉터 h1 {} div {} section,h1 {} // 택스 셀렉터 (복수 선택 가능) #only {} // id 셀렉터 .widget {} .center {} // class 셀렉터 a[href] { } p[id="only"] { } p[class~="out"] { } p[class|="out"] { } section[id^="sect"] { } div[class$="2"] { } div[class*="w"] { } // attribure 셀렉터 자식/후손/형제 셀렉터 자식 header > p { } 후손 header p {} 형제 section ~ p { } 인접 형제 section + p { } 기타 a:link { } /*사용자가 방문하지 않은 요소를 선택합..