热门关键字:
jquery > jquery教程 > jquery教程 > 通用选择器:*

通用选择器:*

290
作者:管理员
发布时间:2020/9/7 10:05:24
评论数:0
转载请自觉注明原文:http://www.jq-school.com/Show.aspx?id=2498

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元素





如果您觉得本文的内容对您的学习有所帮助:支付鼓励



关键字:css
友荐云推荐