在jsTree上设置行高? [英] Setting line-height on a jsTree?
问题描述
我正在使用jstree创建多级树,并且我希望能够设置比您通常看到的更大的行高,以便可以有一些大的标题. (如果我将字体设置得较大,则线条会重叠.)
I'm using jstree to create a multi-level tree, and I want to be able to set a larger line-height than you usually see, so that I can have some large headings. (If I set the font larger, the lines simply overlap.)
我尝试过在li和element上设置line-height CSS属性,但是都没有效果. jstree似乎以编程方式覆盖了这些值. (我什至尝试在创建树后使用jQuery重新设置这些值,但这无济于事.)
I've tried setting the line-height CSS property on the li and a elements, but neither have an effect; jstree seems to be programmatically overriding those values. (I even tried using jQuery to re-set those values after the tree is created, but that didn't help.)
为了使事情更复杂,我想让不同的层次具有不同的间距,以便顶层可以大于较深的层次.
To make things more complicated I would like to have different levels have different spacing, so that the top levels can be larger than the deeper levels.
我已经尝试过主题插件,但是找不到控制行高的任何东西.
I've tried the theme plugin but I can't find anything to control line height.
谢谢...
推荐答案
是否有助于增加元素的高度?
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;
}
这篇关于在jsTree上设置行高?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!