:first-child 和 :last-child 分别表示父元素中第一个 或者 最后一个 子元素设置样式,如上图 转载于:https://www.cnblogs.com/agansj/p/8552189.html