A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 不二晨 金牌黑马   /  2019-1-18 10:10  /  764 人查看  /  2 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

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


2 个回复

倒序浏览
奈斯,感谢分享
回复 使用道具 举报
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马