css 设置特定条件下的标签

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

  

p:nth-child(2)
{
background:#ff0000;
}
posted @ 2021-01-27 14:32  web格调  阅读(188)  评论(0编辑  收藏  举报