亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

任務三:設置縮略圖背景圖像

/*任務三、設置縮略圖背景圖像*/
.clearfix?a:nth-of-type(1)::after?{	
????background:?url(1.jpg)?no-repeat?center;
}
.clearfix?a:nth-of-type(2)::after?{	
????background:?url(2.jpg)?no-repeat?center;
}
.clearfix?a:nth-of-type(3)::after?{	
????background:?url(3.jpg)?no-repeat?center;
}
.clearfix?a:nth-of-type(4)::after?{	
????background:?url(4.jpg)?no-repeat?center;
}
.clearfix?a:nth-of-type(5)::after?{	
????background:?url(5.jpg)?no-repeat?center;
}

所有a元素的背景縮略圖都應用的第一個?

但是我用的nth-of-type(n)設置了對每個a元素應用不同的縮略圖的啊

正在回答

1 回答

.slider li:nth-of-type(1) a::after {

? ? ? ? ? ? background: url(http://www.w3cplus.com/demo/css3/CSS3Fullbackground/sbg1.jpg) no-repeat center ?;

? ? ? ? ? ? }

應該是對li標簽進行選擇啊,而不是對a標簽,你試試這種寫法,看看有沒有用

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

舉報

0/150
提交
取消

任務三:設置縮略圖背景圖像

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號