日期:2014-05-16  浏览次数:20340 次

extjs tree(树)换节点图标及去掉图标后去掉空白部分

/*ext/resources/ext-all.css????? 817行 闭合文件夹图标*/
.x-tree-node-collapsed .x-tree-node-icon{
?background-image:url(../images/default/tree/folder.gif);
}

/*ext/resources/ext-all.css????? 7134行?? 打开文件夹图标*/
.x-tree-node-expanded .x-tree-node-icon
{
?background-image: url(../images/default/tree/folder-open.gif);
}

/*ext/resources/xtheme-blue.css????? 812行?? 节点图标*/
.x-tree-node-leaf .x-tree-node-icon{
?background-image:url(../images/default/tree/leaf.gif);
}


/*ext/resources/ext-all.css???? 3220行? 图标所在位置设置*/
.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon
{
?border: 0 none;
?height: 18px; /*空白部分高*/
?margin: 0;
?padding: 0;
?vertical-align: top;
?width: 16px;/*空白部分宽*/
?background-position: center;
?background-repeat: no-repeat;
}

想换的图标只需修改相应的图标,想去掉图标只需将图标所在位置设置:height:0px;width: 0px.

如果只想修改某个tree的样式,添加个cls就可以了。

?

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/mayixi/archive/2010/05/15/5595196.aspx

1 楼 zuoming99 2012-02-24  
直接display:none不就ok了?