在extjs中使用自定义的图标,一般使用的是16*16的png格式的
1.创建css样式:
.peiy-excel{background: url(../images/excel.png) left top no-repeat!important;}
.peiy-printer{background: url(../images/printer.png) left top no-repeat!important;}
2.将png图标文件拷贝到相应的images目录中
3.在js中定义
var btn_print = new Ext.Button({
text: '打印',
iconCls : 'peiy-printer'
});
转载于:https://www.cnblogs.com/sfmjp/articles/2848662.html