8

我有一个像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');
}

我该怎么做谢谢

4

1 回答 1

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

于 2013-07-13T21:23:33.173 回答