css定位:p:nth-child(n)

p:nth-child(n)

定位p标签下的第一个元素,下标从1开始。

首先是一个标签下有多个相同的元素.

如index_service_cnt js_service_list下有多个class="index_service_cnt_itemWrap"的元素,此时需要定位其中一个

标签为a
$('.js_service_list a:nth-child(1)')

posted @ 2020-06-14 19:32  捷后愚生  阅读(341)  评论(0编辑  收藏  举报