欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!

id选择器:#header{}

class选择器:.header{}

元素选择器:div{}

子选择器:ul > li{}

后代选择器:div p{}

伪类选择器::hover、::selection、.action、:first-child、:last-child、:first-of-type、:last-of-type、:nth-of-type(n)、:nth-of-last-type(n)等,例如a:hover{}

伪元素选择器: :after、:before等,例如:li:after

属性选择器: input[type="text"]

组合选择器:E,F/E F(后代选择器)/E>F(子元素选择器)/E+F(直接相邻元素选择器----匹配之后的相邻同级元素)/E~F(普通相邻元素选择器----匹配之后的同级元素)

层次选择器:p~ul 选择前面有p元素的每个ul元素

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css-jiaocheng/tc59033.shtml