p:first-child:nth-last-child(n+2),
p:first-child:nth-last-child(n+2) ~ p
I guess this is what the questioner wants. When the number of p elements is greater than or equal to 2, all p elements are selected; when the number of p elements is less than 2, none of the p elements are selected. In fact, this method can be generalized to select all elements when the number of elements is within a certain number or range. For details, please refer to Chapter 38 of "CSS Revealed": Setting styles based on the number of sibling elements.
I guess this is what the questioner wants. When the number of p elements is greater than or equal to 2, all p elements are selected; when the number of p elements is less than 2, none of the p elements are selected.
In fact, this method can be generalized to select all elements when the number of elements is within a certain number or range.
For details, please refer to Chapter 38 of "CSS Revealed": Setting styles based on the number of sibling elements.
Just p p, select all p tags under p, you can also select the first, last, odd number, even number