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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

.post p:last-child和.post :last-child的區(qū)別

不明白的 .post p:last-child和.post :last-child有什么區(qū)別,效果不都是一樣的嗎

正在回答

1 回答

:last-child (選擇父元素的最后一個(gè)子元素)

??<style>
???.post:last-child{/*有效,標(biāo)簽里所有元素*/
????color:pink;
???}
???.post div:last-child{/*如果最后一個(gè)標(biāo)簽是<div>的時(shí)候,它就有效*/

?????color:blue;
???}
???.post p:last-child{/*如果最后一個(gè)標(biāo)簽是<p>的時(shí)候,它就有效*/

?????color: red;
???}
???.post a:last-child{
??? ?color: orange;/*如果最后一個(gè)標(biāo)簽是<a>的時(shí)候,它就有效*/
???}
</style>
?</head>
?<body>
???<div class="post">
???? <p>我是p-1</p>
???? <p>我是p-2</p>
???? <p>我是p-3</p>
???? <div>我是div-1</div>
???? <p>我是p-4</p>
???? <p>我是p-5</p>
???? <div>我是div-2</div><!--現(xiàn)在這里就是最后一個(gè)標(biāo)簽 是div標(biāo)簽,字體會(huì)變成藍(lán)色-->
???? <!--<a>我是插班生</a>-->
???</div>
??
?</body>


1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕萊塢9334362 提問(wèn)者

懂了,非常感謝
2018-09-05 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

.post p:last-child和.post :last-child的區(qū)別

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

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

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