/*此時first-child不起作用,是因為.tap_con的父元素win的第一個子元素是.top,此時找到第一個子元素,但是其並不是.tab_con*/
<div id="win">
<div class="top">
</div>
<div class="tab_con">
</div>
<div class="tab_con">
</div>
</div>
==========================================================
.tab_con:first-child{
background:#090 !important;
}
==========================================================
.tab_con:nth-child(1){
background:#090 !important;
}
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。