1
내 3divs에서 마지막 p 태그를 대상으로 할 수 없습니다. p
태그의 last-child
의 경계를 제거하고 싶습니다. 어떻게 내가 잘못 여기서 뭐하는 거지 :마지막 자식을 타겟팅하는 방법
<div class="box">
<div class="span4">
<p>Some text.</p>
</div>
<div class="span4">
<p>Some text.</p>
</div>
<div class="span4">
<p>Some text.</p>
</div>
</div>
.span4 {
width: 320px;
p {
font-size: 1.2em;
padding: 0 40px;
border-right: 1px #dfdfdf solid;
}
&:last-child {
border: none;
}
}
그게 제가 풀어야 할 것이지만 그 해결책은 아닙니다. P 태그는 서로 뒤에 있지 않습니다 (내 html 예 참조). 솔루션을 찾았습니다. –
-1 [내 의견] (http://stackoverflow.com/questions/22064704/how-can-i-make-it-so-the-first-element-in-a-div-has)을 무시하는 것입니다. -a-different-css-to-others/22064762 # comment33459234_22064762). 'p'는 부모'.span4'의 유일한 자식이므로 작동하지 않습니다. 모든 단락을 선택합니다! –
진정해, 내 대답을 게시 한 후 귀하의 질문을 편집했습니다. 이전에 html이 없었습니다. – DonJuwe