黑马程序员技术交流社区

标题: 【上海校区】CSS Diner游戏 [打印本页]

作者: 不二晨    时间: 2019-1-18 10:10
标题: 【上海校区】CSS Diner游戏
1.   plate  元素选择器
2.   bento 元素选择器
3.   #fancy  ID选择器
4.   plate > apple  后代元素选择器
5.   #fancy pickle  ID选择器 后代选择器
6.  .small  类选择器
7.   orange.small 元素选择器 类选择器
8.   bento orange.small  后代选择器  符合选择器
9.   plate.bento  并集选择器
10. * 通配选择器
11、plate * 后代选择器、通配选择器
12、plate + .small,plate + apple  兄弟选择器、分组选择器(并集选择器)
13、bento ~ pickle  兄弟选择器
14、plate>apple  子元素选择器
15、plate>orange:first-child  子元素选择器、其他子元素选择器
16、apple,.small:only-child   其他子元素选择器(匹配父元素中唯一一个子元素)  分组选择器(并集选择器)
17、.small:last-child  其他子元素选择器(匹配父元素中最后一个子元素)
18、plate:nth-child(3) 其他子元素选择器(匹配指定位置的子元素)
19、bento:nth-last-child(4)  其他子元素选择器(从最后一个子元素开始匹配指定位置的子元素)
20、apple:first-of-type   其他子元素选择器(匹配第一个子元素)
21、plate:nth-child(even)  其他子元素选择器(选择偶数子元素的位置)
22、plate:nth-of-type(2n+3)  其他子元素选择器(从第三个开始匹配每隔两个匹配一下)
23、apple:only-of-type  其他子元素选择器
24、 .small:last-of-type    其他子元素选择器(匹配父元素中每个类的最后一个父元素)
25、bento:empty   其他子元素选择器(指定空的子元素)
26、apple:not(big,.small)   其他子元素选择器
---------------------
【转载,仅作分享,侵删】
作者:YRyr.*
原文:https://blog.csdn.net/weixin_43152725/article/details/85136162



作者: 不二晨    时间: 2019-1-23 17:23
奈斯,感谢分享
作者: 梦缠绕的时候    时间: 2019-1-24 17:51





欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2