<div class="wrap">
<strong> title </strong>
<p> description </p>
<ul class="list">
<li class="item i1"> item 1 </li>
<li class="item i2"> item 2 </li>
<li class="item i3"> item 3 </li>
</ul>
</div>
strong + .list .i2
div > .list .i2
.wrap .item.i2
.wrap .list .i2
❌내 풀이-> .wrap .list .i2
⭕오답 풀이
1번.
strong+.list.i2
등장 개념 >
- 인접 형제 선택자 +
- class 선택자인 .
- 다중클래스 선택자
.foo.bar { ... }
-> 클래스 속성에 foo랑 bar가 다 있는 경우
<strong>
의 인접형제 선택자면서 클래스 속성이 포함된경
2번. div > .list .i2
:focus
:active
:hover
:visited
❌내 풀이 -> :focus
⭕오답 풀이
정답 -> :hover
:마우스 포인터가 위치해있는 요소에 적용
:active
: 사용자 입력에 의해 순간적으로 활성화 된 요소에 적용
:focus
: 현재 입력포커스가 있는 요소
:visited
:이미 방문한 하이퍼링크 요소
<div class="wrap">
<div class="box">box</div>
</div>
.wrap { color: orange !important; }
.wrap div { color: red; }
.box { color: green !important; }
.wrap .box { color: blue; }
red
orange
blue
green
❌내 풀이
⭕오답 풀이