v-for用 nth-child
时间: 2023-10-22 08:03:05 浏览: 198
根据引用中的信息,v-for不能直接使用nth-child选择器,因为v-for会将整个元素作为一个整体进行循环。所以不能通过nth-child来选择v-for生成的元素。123
引用[.reference_title]
- 1 2 first-child、last-child、nth-child( )失效问题[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2
allinsert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - 3 nth-child 麻蛋 不要被它的 child 锁迷惑 要同类元素才行 v-for也没有关系的![target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2
allinsert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
相关推荐


















