我想知道爲什麼JQuery在應用addCLass方法時未應用border-bottom css屬性。它應用顏色但不包含邊框。這是爲什麼? JSFiddle:http://jsfiddle.net/egh7a/爲什麼jQuery不應用邊框樣式?
謝謝。
HTML
<section class="news">
<article>one</article>
<article>two</article>
<article>three</article>
<article>four</article>
</section>
jQuery的
$(".news article:last").addClass("two");
CSS
.news {
border-top: 1px solid #777;
}
.news article {
padding-top: 10px;
padding-bottom; 10px;
border-bottom: 1px dashed #999;
}
.two {
color: red;
border-bottom: black solid 2px;
}
特異性我的朋友 –