css3中有哪些伪选择器?

CSS3中有以下伪选择器:

  1. :active(选中的元素处于活动状态)
  2. :checked(选中的表单元素)
  3. :disabled(禁用的表单元素)
  4. :empty(没有子元素的元素)
  5. :enabled(可用的表单元素)
  6. :first-child(第一个子元素)
  7. :first-of-type(同类型元素的第一个)
  8. :focus(获取焦点的元素)
  9. :hover(鼠标悬停的元素)
  10. :last-child(最后一个子元素)
  11. :last-of-type(同类型元素的最后一个)
  12. :not(不满足指定选择器的元素)
  13. :nth-child(n)(选择第n个子元素)
  14. :nth-last-child(n)(选择倒数第n个子元素)
  15. :nth-last-of-type(n)(选择倒数第n个同类型元素)
  16. :nth-of-type(n)(选择第n个同类型元素)
  17. :only-child(唯一的子元素)
  18. :only-of-type(唯一的同类型元素)
  19. :root(文档的根元素)
  20. :target(URI指向的目标元素)
  21. :visited(已访问的链接)

相关推荐

  1. css3哪些选择

    2024-04-22 13:16:04       17 阅读
  2. css3哪些类?

    2024-04-22 13:16:04       12 阅读
  3. CSS哪些选择

    2024-04-22 13:16:04       21 阅读
  4. css3新增哪些

    2024-04-22 13:16:04       8 阅读
  5. css3新增元素哪些

    2024-04-22 13:16:04       7 阅读
  6. 如何使用 CSS 的 :root 选择

    2024-04-22 13:16:04       23 阅读
  7. css3新增的哪些

    2024-04-22 13:16:04       35 阅读
  8. css3新增的哪些

    2024-04-22 13:16:04       54 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-22 13:16:04       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-22 13:16:04       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-22 13:16:04       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-22 13:16:04       18 阅读

热门阅读

  1. PotCSS

    2024-04-22 13:16:04       16 阅读
  2. Hbase 伪分布式安装 - UbuntuServer2204

    2024-04-22 13:16:04       10 阅读
  3. shell 脚本基础练习

    2024-04-22 13:16:04       16 阅读
  4. Saas系统多任务分发排队

    2024-04-22 13:16:04       17 阅读
  5. Windows上构建 Chisel-Bootcamp

    2024-04-22 13:16:04       18 阅读
  6. 低配置的电脑上刷新WPF DataGrid 很卡,如何优化?

    2024-04-22 13:16:04       14 阅读