Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在div中隐藏前两个表_Html_Css_Dom - Fatal编程技术网

Html 如何在div中隐藏前两个表

Html 如何在div中隐藏前两个表,html,css,dom,Html,Css,Dom,我的SharePoint web应用程序中有以下左侧导航菜单:- 现在我想隐藏Div中的前两个表(名为Documents&Images),我尝试了以下操作,但它只删除了“Documents”表:- 有人能就此提供建议吗?使用:n子项(n)选择器,其中n是元素在容器中的位置索引,因此: #ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(1), #ctl00_PlaceHolderLeftNavBar_ctl02

我的SharePoint web应用程序中有以下左侧导航菜单:-

现在我想隐藏Div中的前两个表(名为Documents&Images),我尝试了以下操作,但它只删除了“Documents”表:-

有人能就此提供建议吗?

使用
:n子项(n)
选择器,其中
n
是元素在容器中的位置索引,因此:

#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(1),
#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(2) {
    ...
}
使用
:第n个子(n)
选择器,其中
n
是元素在容器中的位置索引,因此:

#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(1),
#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(2) {
    ...
}
使用
:第n个子(n)
选择器,其中
n
是元素在容器中的位置索引,因此:

#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(1),
#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(2) {
    ...
}
使用
:第n个子(n)
选择器,其中
n
是元素在容器中的位置索引,因此:

#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(1),
#ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView > table:nth-child(2) {
    ...
}

你可以简单地做一些像下面的例子,你很好去

#your-div-name > table:nth-of-type(-n+2){
    display: none;
  }

您只需执行下面的示例,就可以了

#your-div-name > table:nth-of-type(-n+2){
    display: none;
  }

您只需执行下面的示例,就可以了

#your-div-name > table:nth-of-type(-n+2){
    display: none;
  }

您只需执行下面的示例,就可以了

#your-div-name > table:nth-of-type(-n+2){
    display: none;
  }

还有,第n个孩子(2-n)也,第n个孩子(2-n)也,第n个孩子(2-n)也,第n个孩子(2-n)