ExtJs 自定义图片

在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'
   });

posted @ 2013-01-07 09:49  矢风快乐  阅读(162)  评论(0)    收藏  举报