美文网首页
#lilia的挣扎之旅#css选择器

#lilia的挣扎之旅#css选择器

作者: 白骨鱼石 | 来源:发表于2019-02-22 23:05 被阅读0次

兄弟选择器

  • 通用兄弟选择器
    h1~p
  • 相邻选择器
    包含两个条件:拥有相同父元素;某元素的下一个元素
    h1+p

父子选择器

h1>p

后代选择器

h1 p

同时为一组选择器定义样式

h1, p, h2

  • 包含obb
    [type*="obb"]

[type$="ato"]

  • 开头是sa
    [type^="Sa"]
    [type]
    [type="haha"]
    :not(.small)
    :empty
    :nth-child(n)
    :first-of-type
    :last-of-type
    :nth-last-child(n)
    :nth-of-type(even/odd)
    :nth-of-type(2n+3)

相关文章

网友评论

      本文标题:#lilia的挣扎之旅#css选择器

      本文链接:https://www.haomeiwen.com/subject/zppyyqtx.html