after伪元素的理解 伪类选择器,伪类和伪元素的区别?

伪类选择器,伪类和伪元素的区别?Pseudo class应该写成:WeiLei Pseudo element应该写成:weiyuansu但是当前面的规范不清楚时,伪元素和伪类写为:weiyuansu:

伪类选择器,伪类和伪元素的区别?

Pseudo class应该写成:WeiLei Pseudo element应该写成:weiyuansu

但是当前面的规范不清楚时,伪元素和伪类写为:weiyuansu:WeiLei

为了与过去的编写兼容

所以伪元素写为引号伪元素主要包括:e:第一个字母/e::第一个字母e:第一行/e::第一行e:之前/e::之前e:之后/e::之后e::占位符e::selection

伪类主要包括:e:link e:visited e:hover e:active e:focus e:lang(FR)e:not(s)e:root e:first child e:last child e:only child e:nth child(n)e:nth last child(n)e:first of type e:last of type e:only of type e:nth of type(n)e:nth last of type(n)e:empty e:checked e:enabled e:target@页码:首页:左@页码:右

单冒号和双冒号主要用于区分伪元素和伪类