eq  第几个索引
$("li:eq(2)")
 
gt 大于第几个索引
$("li:gt(2)")
 
lt(小于)前几个索引
$("li:lt(2)")
 
$("li:parent")
$("li:has(.span)")   选择器
$("li:contains(列表)")  文本
 

:first-child 匹配所给选择器( :之前的选择器)的第一个子元素

:last-child   匹配最后一个子元素

posted on 2021-11-09 08:13  卡坦菲  阅读(31)  评论(0)    收藏  举报