——:first—child{} 既是——这个标签也必须是这个标签第一个子标签才可以,始终以——标签为主体
*:first—child{}表示只要是第一个子元素就可以
——:last—child{ } 必须是——这个标签,同时——这个标签也必须是最后一个孩子
——:nth—child(even){} 偶数行变化
——:nth—child(odd){} 奇数行变化
这两个可以再隔行变色中使用到
——:nth—child(行数){} 写第几就代表着第几个——标签发生变化
p:first-of-type{} 表示只要是第一个p标签就会变化
p:last-of-type{} 表示只要是最后一个p标签就会变化


网友评论