将div中的第一个p元素的字体颜色设置为红色
div p:first-child{
color: red;
}
div p:first-of-type{
color: red;
}
p:last-child{
color: blueviolet
}
p:last-of-type{
color: lawngreen
}
p:nth-child(even){
color: red
}
p:nth-child(2n+1){
color: red
}
p:only-child{
color: yellow
}
p:only-of-type{
color: yellow
}
div:empty{
background-color: red
}
p:not(.p1){
background-color: skyblue
}