Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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
Jquery 使悬停突出显示FancyTree中的整个li行_Jquery_Css_Hover_Fancytree - Fatal编程技术网

Jquery 使悬停突出显示FancyTree中的整个li行

Jquery 使悬停突出显示FancyTree中的整个li行,jquery,css,hover,fancytree,Jquery,Css,Hover,Fancytree,我正在使用FancyTree,希望在li项目悬停时突出显示整行。目前,它只高亮显示li本身,因此高亮显示不会一直延伸到(父ul的)左侧边距 你可以在这里看到小提琴: 这在CSS中可能吗?还是需要一些JavaScript?请记住,我无法手动设置li缩进,因为它们是无限嵌套的 HTML: 非常感谢试着这样做 在ui.fancytree.css行号547中 .fancytree-plain span.fancytree-node:hover span.fancytree-title{ backgr

我正在使用FancyTree,希望在li项目悬停时突出显示整行。目前,它只高亮显示li本身,因此高亮显示不会一直延伸到(父ul的)左侧边距

你可以在这里看到小提琴:

这在CSS中可能吗?还是需要一些JavaScript?请记住,我无法手动设置li缩进,因为它们是无限嵌套的

HTML:

非常感谢

试着这样做

在ui.fancytree.css行号547中

.fancytree-plain span.fancytree-node:hover span.fancytree-title{
  background-color: #eff9fe;
  border-color: #70c0e7;
  width: inherit;
}
使用


所以fancytree“wide”扩展正好做到了这一点:

这不会突出显示整个li元素行吗?
span.fancytree-node:hover {
        background: #f2f6f9 !important;
       color: #5b9bd1 !important;
       cursor:pointer;
}

span.fancytree-node:hover > span.fancytree-title{
       color: #5b9bd1 !important;
}
.fancytree-plain span.fancytree-node:hover span.fancytree-title{
  background-color: #eff9fe;
  border-color: #70c0e7;
  width: inherit;
}
 $("span.fancytree-node:").hover( function () {
              $(this).css({"background-color":"#eff9fe"});
           }, 

           function () {
              $(this).css({"background-color":"white"});
           }
 )