选择器—餐厅练习
选择器—餐厅练习
答案:
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)否定伪类