li:nth-child()和 li:nth-of-type()选择器区别 .demo li:nth-child(2):表示demo下面第二个元素,若此元素不是li,则选择失败。.demo li:nth-of-type(2):表示demo下面第二个li元素。