CSS样式中的JS Tree自定义

时间:2019-03-15 14:38:50

标签: javascript html css

我正在尝试为我的任务之一创建树结构列表。我打算为此使用JS-TREE plugin。插件仍然具有很多功能,我必须进行一些样式更改以匹配给定的设计。

这是我为此尝试过的code pen链接

1. Change the plus-square with angle-down icon
2. Change the minus-square with angle-up icon
3. change the square-filled-grey icon(will come if any few of child nodes selected) with minus-square icon
4. Hover blue highlighting not needed

有什么自定义方式吗?还是您的经验中有任何超级热门插件?

1 个答案:

答案 0 :(得分:1)

因此,看起来他们正在使用精灵图并更改背景位置以选择要显示的图标

我能够移动它

.jstree-proton .jstree-anchor > .jstree-undetermined {
    background-position: -38px -5px;
}

这使#3满意。如果检查任何图标(jstree-icon类),将看到分配给32.png的背景。您必须更改那里存在的图标的位置。对于上下角度,您必须隐藏它们提供的背景图像并插入自己的图标