Extjs Treepanel:CSS更改默认图标(节点和叶子)

时间:2013-07-13 16:05:13

标签: extjs tree extjs4 extjs4.1 extjs4.2

我有一个像 http://jsfiddle.net/bmbMy/ 的树状小组 我尝试使用css更改默认图标(节点和叶子)。但那不起作用。

.x-grid-row  .x-grid-tree-node-expanded {
    background: url('http://icons.iconarchive.com/icons/sekkyumu/developpers/16/Play-Green-Button-icon.png') no-repeat center center !important;
}
.x-grid-row  .x-grid-tree-node-leaf {
    background-image:url('http://icons.iconarchive.com/icons/graphicrating/koloria/16/Button-Play-Pause-icon.png');
}

我该怎么做呢谢谢

1 个答案:

答案 0 :(得分:6)

您没有覆盖正确的css类。这就是你需要的:

.x-grid-tree-node-expanded .x-tree-icon-parent {
    background: url('http://icons.iconarchive.com/icons/sekkyumu/developpers/16/Play-Green-Button-icon.png') no-repeat center center !important;
}
.x-grid-row  .x-tree-icon-leaf {
    background-image:url('http://icons.iconarchive.com/icons/graphicrating/koloria/16/Button-Play-Pause-icon.png');
}

更新后的jsfiddle