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
- node.js
- DART
- Component
- 자바스크립트
- GRID
- HTML
- Mongoose
- API
- Flutter
- react
- 리액트
- Session
- TypeScript
- pug
- javscript
- nodejs
- ECMAScript
- express
- MongoDB
- NextJs
- graphQL
- clonecoding
- backend
- heroku
- ES6
- CSS
- CLONE
- form
- JavaScript
- frontend
Archives
- Today
- Total
Enjoy Programming
combinators 본문
combinators는 선택자들 사이의 관계를 설명
CSS 선택자는 하나 이상의 단순 셀렉터를 포함 할 수 있다.
셀렉터 사이에 combinators를 포함해서 연결할 수 있다.
- 자손 선택자(descendant selector) : space
- 자식 선택자(child selector) : >
- 인접 형제 선택자(adjacent sibling selector) : +
- 일반 형제 선택자(general sibling selector) : ~
자손 선택자 : space
지정된 요소의 자손인 모든 요소와 일치, space bar로 조상과 자손간 공간을 주고 입력
p span { color : wheat; }

자식 선택자 : >
자식 선택은 지정된 요소의 직접적인 모든 자식 요소를 선택함
div > span {text-decoration:underline;}

인접 형제 선택자 : +
인접 형제 선택은 지정된 요소의 인접 형제인 모든 요소를 선택
형제요소는 같은 부모 요소를 가져야 하며, adjacent는 immediately following을 의미
P + span { text-decoration: underline; }

일반 형제 선택자 : ~
일반 형제 선택은 지정된 요소의 형제인 모든 요소를 선택
p ~ span {text-decoration: underline;}

'CSS' 카테고리의 다른 글
states (pseudo selecotrs) (0) | 2021.03.25 |
---|---|
attribute selectors (0) | 2021.03.25 |
pseudo selector (0) | 2021.03.25 |
position 을 알아보자 (0) | 2021.03.24 |
Flex box를 알아보자 (0) | 2021.03.24 |