伪类

作者: 阿鲁提尔 | 来源:发表于2017-09-26 22:09 被阅读0次

    1.div:first-child
    2.div :first-child
    3.div:first-of-type
    4.div :first-of-type

    用css添加序号

    p{
      counter-increment:counter;
    }
    p:before{
      content"counter(counter)
    }
    
      <p data-num="3">xxx</p>
      p{
        counter-increment;
      }
      p:before{
        content:attr(data-num)
      }
    

    :first-line 第一行设置属性

    :first-letter 第一个字设置属性

    n 级楼梯 每次可以下 1级或者2级 问 n=20 那么一共有多少种下法?


    css验证邮箱
    http://js.jirengu.com/tupec/1

    相关文章

      网友评论

          本文标题:伪类

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