html – 需要使用CSS选择器选择第二个表的第二行
发布时间:2020-12-14 23:47:43 所属栏目:资源 来源:网络整理
导读:我有一个 HTML表格如下: table class="reference notranslate" tr../tr . . tr../tr/tabletable class="reference notranslate" tr../tr . . tr../tr/tabletable class="reference notranslate" tr../tr . . tr../tr/table 我知道XPATH://表[@class =’ref
我有一个
HTML表格如下:
<table class="reference notranslate"> <tr>..</tr> . . <tr>..</tr> </table> <table class="reference notranslate"> <tr>..</tr> . . <tr>..</tr> </table> <table class="reference notranslate"> <tr>..</tr> . . <tr>..</tr> </table> 我知道XPATH://表[@class =’reference notranslate’] [2] / tr [2] 我想选择第二个表的第二行.任何人都可以帮助如何编写CSS选择器吗? 解决方法
所以,你的意思是: table.reference.notranslate:nth-child(2) tr:nth-child(2) 这将选择第二个表的第二个后代tr元素,它具有两个类(引用和非转换). jsFiddle here. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |