CSS选择器器练习之餐厅小游戏答案和解析(下)

17  .small:last-child  //伪类选择器    :last-child选择最后一个子元素

18  plate:nth-child(3)  //伪类选择器    :nth-child 选择第n个子元素

19   bento:nth-last-child(3) //伪类选择器   :nth-last-child 选着倒数第n(父元素中的位置)个同类子元素

20  apple:first-of-type ///伪类选择器   :first-of-type 选择同类子元素中的第一个

21  plate:nth-of-type(2n)  //伪类选择器  :nth-of-type(2n)选择偶数的元素

22 plate:nth-of-type(2n+3)  //伪类选择器   

23 apple::only-of-type   //伪类元素选择器   

24 orange:last-of-type,apple:last-of-type    //选择器的并集

25  bento:empty  // :empty选择空的元素

26 apple:not(.small)  //  :not(X)选择木有X的元素

27  apple[for="Ethan"],plate[for="Alice"],bento[for="Clara"]   //属性选择器  标签[ 属性名=“属性值”]

28 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

渗透者:'

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值