css选择器:last-child和:last-of-type区别_last-of-type和last-child区别-CSDN博客

网站介绍:文章浏览阅读535次。结论:1.:last-child表示其父元素的最后一个子元素,且这个元素是css指定的元素,才可以生效2.:last-of-type表示其父元素下的最后一个指定类型的元素,不必要求父元素最后一个子元素与css指定元素一样:last-child:last-of-type..._last-of-type和last-child区别