본문 바로가기
Front-end/Web

CSS Combinator Selectors

by JiGyeong 2022. 7. 12.

div p

div 하위의 모든 p

 

div > p

div 1 step 밑에만 속한 p 

 

div + p

div 외부, 바로 다음에 인접한 p

 

div ~ p

div 외부, 다음 step에 있는 모든 p

 

참고

https://www.w3schools.com/css/css_combinators.asp

 

CSS Combinators

W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

www.w3schools.com