2023-05-11css伪类选择器

一、伪类选择器是什么?

二、第一种伪类

1.    :first-child{}

2.    :last-child{}

3.    :nth-child(n){},(n为具体数字)

1.    :nth-child(n){}

2.    :nth-child(n){}。

3.    :nth-child(2n){}

4.    :nth-child(even){}

5.    :nth-child(2n+1){}

6.    :nth-child(odd){}

三、第二种伪类

1.    first-of-type

2.    last-of-type{}

3.    nth-of-type(n){},(n为具体数字)

1.    :nth-of-type(n){}

2.    :nth-of-type(n){}。

3.    :nth-of-ype(2n){}

4.    :nth-of-type(even){}

5.    :nth-of-type(2n+1){}

6.    :nth-od-type(odd){}

四、第三种伪类

1.    :not(){}

————————————————

版权声明:本文为CSDN博主「luckyboy!」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/m0_57051895/article/details/126451542

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容