如何在extjs按钮中居中放置图标



我有一个简单的按钮,但我无法使图标居中。

{
    xtype: 'button',
    width: 150,
    height: 150,
    cls: 'startbutton'
}

css:

.startbutton { 
    background-image: url(Camera.png) !important;
}

此图像为72x72像素。

我认为,您需要背景位置

.startbutton { 
    background-position: center center;
    background-image: url(Camera.png) !important;
}

是否有理由不使用标准的东西:

icon: '',
iconAlign: 'center'

最新更新