nth-child() 选择器 规定属于其父元素的第二个子元素的每个 p 的背景色: p:nth-child(2) { background:#ff0000; } 转载于:https://www.cnblogs.com/EmilyGarden/p/8491671.html