Setting line-height on a jsTree?

百般思念 提交于 2019-11-29 15:21:30

Does it help to increase the height of the element?

.jstree-leaf {
 font-size: 37px;
 height: 50px;
}

.jstree-leaf a.jstree-hovered {
 height: 50px;
}

.jstree-leaf a.jstree-clicked {
 height: 50px;
}

FWIW, this worked nicely for me. It won't give you super-large heading-size, but it increases the size perfectly for my liking.

Setup my tree with variant: large

//jstree config
$("#tree").jstree({
  "core" : {
    "themes" : {
      "variant" : "large"
    }
  }
  // ...
});

and then also change the font-size for all nodes:

/* CSS */    
.jstree-node {
    font-size: 13pt;
}
Ryan Shripat

On its own, MMeah's solution did not work for me. Combining this with the code here and changing the height to auto worked for me. See full answer here.

.jstree-default a { 
    white-space:normal !important; height: auto; 
}
.jstree-anchor {
    height: auto !important;
}
.jstree-default li > ins { 
    vertical-align:top; 
}
.jstree-leaf {
    height: auto;
}
.jstree-leaf a{
    height: auto !important;
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!