美文网首页
2019-05-27

2019-05-27

作者: CC__XX | 来源:发表于2019-05-27 23:01 被阅读0次

选择器—餐厅练习

1.plate     元素选择器

2.bento      元素选择器

3.#fancy      id选择器

4.plate apple     元素选择器

5.#fancy pickle      id选择器

6. .small       类选择器

7.orange.small       类选择器

8.bento orange      类选择器

9.plate,bento          并集选择器

10.*         通配符选择器

11.plate*            类选择器

12.plate+             元素兄弟选择器

13.bento~pickle            元素兄弟选择器

14.plate>apple                 子元素选择器

15.plate>orange:first-child                     子元素选择器

16.plate>apple:only-child,plate>pickle:only-child                           子元素选择器

17.plate>apple,pickle:last-child                                子元素选择器

18.plate:nth-child(3)               子元素选择器

19.bento:nth-last-child(4)                       子元素选择器

20.apple:first-of-child                    子元素选择器

21.plate:nth-of-child(even)                     子元素选择器

22.plate:nth-of-type(2n+3)                  子元素选择器

23.plate>apple:only-of-type                     子元素选择器

24.orange:last-of-type,apple:last-of-type                    子元素选择器

25.bento:empty              属性选择器

26.apple:not(.small)                     否定伪类

相关文章

网友评论

      本文标题:2019-05-27

      本文链接:https://www.haomeiwen.com/subject/gjdktctx.html