javascript - CSS 样式中的 JS 树自定义
问题描述
我正在尝试为我的一项任务创建一个树结构列表。我打算为此使用JS-TREE 插件。该插件仍然具有许多功能,我必须做一些样式更改以匹配给定的设计。
这是我尝试过的代码笔链接,
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
有什么方法可以定制这个吗?或者根据您的经验有任何超级热门插件吗?
解决方案
因此,看起来他们正在使用精灵图并更改背景位置以选择出现的图标
我能够移动这个
.jstree-proton .jstree-anchor > .jstree-undetermined {
background-position: -38px -5px;
}
这满足了#3。如果您检查任何图标(jstree-icon 类),您将看到分配给 32.png 的背景。您必须更改那里存在的图标的位置。对于上下角度,您必须隐藏他们提供的背景图像并插入您自己的图标
推荐阅读
- javascript - 为对象数组反应输入 setState
- javascript - 无法获取 req.userData.role 的值
- python - Gimp 程序中的 OpenCV Python 脚本 - 草/硬表面边缘检测
- java - 我需要 java(eclipse) 中的椭圆 ROI 而不是二次 ROI
- java - 创建包含另一个集合的内容加上一个元素的新集合的最快方法是什么
- javascript - 在 ng-repeat 中引用 html 输入
- r - 将数值向量转换为字符向量
- git - 无法让 git 忽略 VS 中的 App_Data mdf 文件
- sql - 更新依赖于同一个表中的其他两个列的列
- javascript - PWA 上的会话长度跟踪