第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么我的nth-child(n)無法選中元素

<section?class="gray-section">
????<div?class="article-preview">
????????<div?class="img-section">
????????????<img?src="assets/pic01.jpg"/>
????????</div>
????????<div?class="text-section">
????????????<h3>又一個標題</h3>
????????????<div?class="sub_heading">又一個子標題</div>
????????????<p>Lorem?ipsum?dolor?sit?amet,?consectetur?adipisicing?elit.?Amet?dolores?eveniet?nisi?reprehenderit
????????????????similique?suscipit?tempore.</p>
????????</div>
????</div>
????<div?class="article-preview">
????????<div?class="text-section">
????????????<h3>又一個標題</h3>
????????????<div?class="sub_heading">又一個子標題</div>
????????????<p>Lorem?ipsum?dolor?sit?amet,?consectetur?adipisicing?elit.?Amet?dolores?eveniet?nisi?reprehenderit
????????????????similique?suscipit?tempore.</p>
????????</div>
????????<div?class="img-section">
????????????<img?src="assets/pic02.jpg"/>
????????</div>
????</div>
????<div?class="article-preview">
????????<div?class="img-section">
????????????<img?src="assets/pic03.jpg"/>
????????</div>
????????<div?class="text-section">
????????????<h3>又一個標題</h3>
????????????<div?class="sub_heading">又一個子標題</div>
????????????<p>Lorem?ipsum?dolor?sit?amet,?consectetur?adipisicing?elit.?Amet?dolores?eveniet?nisi?reprehenderit
????????????????similique?suscipit?tempore.</p>
????????</div>
????</div>
</section>
.gray-section{
????background:?#30363e;
}
.gray-section:nth-child(odd){
????background-color:rgba(255,255,255,.1);
}

.article-preview:after?{
????content:?"";
????display:?block;
????clear:?both;
}
.img-section?{
????width:?45%;
????font-size:0;
}

.img-section?img?{
????width:?100%;
}

.text-section?{
????position:?relative;
????top:?40px;
????left:?40px;
????width:?55%;
????letter-spacing:?1px;
????color:?#fff;
}

.text-section?>?*?{
????max-width:?90%;
}

.text-section?.sub_heading?{
????margin-top:?20px;
}
.article-preview?>?div?{
????float:?left;
}

查看chrome控制臺發(fā)現(xiàn)樣式?jīng)]有應用到元素上

正在回答

1 回答

把樣式寫在標簽上是有效果的,用這個選擇器設(shè)置任何樣式都無效

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
HTML5和CSS3扁平化風格博客
  • 參與學習       86787    人
  • 解答問題       406    個

HTML5與CSS3搭建超酷扁平化風格博客

進入課程

為什么我的nth-child(n)無法選中元素

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號