p:first-child选择的是p的父元素的第一个子元素是p的所有第一个p,p:first-of-type选取的是父元素的第一个p。
区别图如下:
first-child:
first-of-type: