伪类选择器 hover
常见的序选择器
:first-child -- 选中同级别中的第一个标签
:last-child -- 选中同级别中的最后一个标签
:nth-child(n) -- 选中同级别中的第n个标签
:nth-last-child(n) -- 选中同级别中的倒数第n个标签
:only-child -- 选中父元素中唯一的标签
还有 first-of-type last-of-type nth-of-type(n) 等选择器,用于选择同级别中同类型的标签
:first-child -- 选中同级别中的第一个标签
:last-child -- 选中同级别中的最后一个标签
:nth-child(n) -- 选中同级别中的第n个标签
:nth-last-child(n) -- 选中同级别中的倒数第n个标签
:only-child -- 选中父元素中唯一的标签
还有 first-of-type last-of-type nth-of-type(n) 等选择器,用于选择同级别中同类型的标签