css 设置特定条件下的标签

  规定属于其父元素的第二个子元素的每个 p 的背景色:

  

p:nth-child(2)
{
background:#ff0000;
}
原文地址:https://www.cnblogs.com/yugueilou/p/14334858.html