选择器
我是谁欧吼 2019-08-12 11:33:53 选择器等的分类以及各种选择器的作用及属性:主要有五种选择器:核心选择器 层次选择器 属性选择器 伪类选择器 伪元素选择器1.核心选择器可以分为: 标签选择器 id选择器 类选择器 逗号选择器 组合选择器 普遍选择器2.层次选择器主要分为: 子元素选择器 后代选择器 兄弟选择器3.属性选择器又称为过滤器在已有选择器的基础上进行筛选 selector[] input[type] input[type=text] input[type^=s] input[type$=t] input[type*=t]4.伪类选择器表示结构的 :first-child :last-child :nth-child() number/2n+1/even、odd 表示状态的 :link :hover :active :visited :focus5.伪元素选择器 selector::after将一个伪元素添加到selector选择到的元素里面的最后面::hover::before::after::first-letter::first-line::selection
d :nth-child() number/2n+1/even、odd 表示状态的 :link :hover :active :visited :focus5.伪元素选择器 selector::after将一个伪元素添加到selector选择到的元素里面的最后面::hover::before::after::first-letter::first-line::selection