https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
The 30 CSS Selectors You Must Memorize
* 전체 다 선택하기
1 2 3 4 | * { margin : 0 ; padding : 0 ; } |
ul안에 있는 li안에있는 a(anchor태그) 만 적용시키기
1 2 3 4 | ul li a { border: 1px solid lightgrey; }
|
adjacent
1 2 3 | ul + p { color : red ; } |
This is referred to as an adjacent selector. It will select only the element that is immediately preceded by the former element. In this case, only the first paragraph after each ul
will have red text.