如何在extjs中正确设置按钮的图标大小?

Meh*_*nai 15 javascript css extjs extjs4

我正在使用extjs4而我正在尝试做的似乎很简单,但我找不到适合它的解决方案.

我有一个64*64px的图标,我希望我的按钮将其显示为背景图像,但是extjs只显示部分图像.在网上搜索一个解决方案,但没有人建议使用它的工作解决方案.我只想让我的背景图像适合到我的按钮.

这是我的js代码:

{
    xtype : 'button',
    text : null,
    iconCls : 'startbutton',
    //icon:'./assets/icons/startbtn.png',
    //style:{height:'60px'},
    width : 64,
    height : 64
}
Run Code Online (Sandbox Code Playgroud)

这是我的css代码:

.x-btn-icon .startbutton {
    background-image: url(start.png) !important;
}
Run Code Online (Sandbox Code Playgroud)

我试过一些css组合但仍然没有成功.

nsc*_*rob 10

iconCls严格指向按钮的图标,如果您希望图片覆盖整个按钮,则应将背景添加到添加到按钮的css类中.

{
    xtype: 'button',
    width: 64,
    height: 64,
    text: 'some text',
    cls: 'startbutton'
}
Run Code Online (Sandbox Code Playgroud)

和css

.startbutton {
    background-image: url(start.png) !important;
}
Run Code Online (Sandbox Code Playgroud)