美文网首页
web学习:01-CSS3选择器(伪类选择器)

web学习:01-CSS3选择器(伪类选择器)

作者: TDB | 来源:发表于2019-06-02 09:54 被阅读0次

    1.动态伪类

    1.1 锚点伪类
    :link, :vistied
    1.2 用户行为伪类
    :hover, :active, :foucs

    2.UI元素状态伪类

    3.CSS3结构类


    3.1 first-child


    一般配合 对应 html标签使用

    3.2 last-Child
    同上

    3.3nth-child(N)



    3.3.1




    3.4nth-last-child(N)



    3.5nth-of-type(N)

    只数 div
    3.6nth-last-of-type(N)
    同上


    3.7 first-of-type



    3.8 last-of-type



    3.9 only-child


    3.10 only-of-type



    3.10 empty

    4.否定选择器


    CSS 权重




    5.伪元素

    5.1 Element::first-line




    5.2 Element::first-letter




    5.3 Element::before




    5.4 Element::after《最实用》



    // 清楚浮动

    //after 清楚浮动

    5.5 Element::selection

    相关文章

      网友评论

          本文标题:web学习:01-CSS3选择器(伪类选择器)

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