• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
谨以此模板祝贺【博客园开发者征途】系列图书《你必须知道的.net》出版发行
返回主页

吃老干妈就西瓜

  • 博客园
  • 首页
  • 新随笔
  • 联系
  • 管理
  • 订阅 订阅

选择器

      • #id    用于搜索的,通过元素的 id 属性中给定的值
      • element   一个用于搜索的元素。指向 DOM 节点的标签名。
      • .class  一个用以搜索的类。一个元素可以有多个类,只要有一个符合就能被匹配到。
      • *  找到每一个元素
      • selector1,selector2,selectorN  你可以指定任意多个选择器,并将匹配到的元素合并到一个结果内。
  • 层级

    • ancestor descendant
    • parent > child
    • prev + next
    • prev ~ siblings
  • 基本

    • :first
    • :not(selector)
    • :even
    • :odd
    • :eq(index)
    • :gt(index)
    • :lang1.9+
    • :last
    • :lt(index)
    • :header
    • :animated
    • :focus
    • :root1.9+
    • :target1.9+
  • 内容

    • :contains(text)
    • :empty
    • :has(selector)
    • :parent
  • 可见性

    • :hidden
    • :visible
  • 属性

    • [attribute]
    • [attribute=value]
    • [attribute!=value]
    • [attribute^=value]
    • [attribute$=value]
    • [attribute*=value]
    • [attrSel1][attrSel2][attrSelN]
  • 子元素

    • :first-child
    • :first-of-type1.9+
    • :last-child
    • :last-of-type1.9+
    • :nth-child
    • :nth-last-child()1.9+
    • :nth-last-of-type()1.9+
    • :nth-of-type()1.9+
    • :only-child
    • :only-of-type1.9+
  • 表单

    • :input
    • :text
    • :password
    • :radio
    • :checkbox
    • :submit
    • :image
    • :reset
    • :button
    • :file
    • :hidden
  • 表单对象属性

    • :enabled
    • :disabled
    • :checked
    • :selected
posted @ 2018-11-13 10:40  吃老干妈就西瓜  阅读(87)  评论(0)    收藏  举报
刷新页面返回顶部

公告

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3 谨以此模板祝贺【博客园开发者征途】系列图书之《你必须知道的.NET》出版发行