我有一个简单的按钮,但我不能让图标居中于它。
{
xtype: 'button',
width: 150,
height: 150,
cls: 'startbutton'
}
的CSS:
.startbutton {
background-image: url(Camera.png) !important;
}
此图片为72x72像素。
答案 0 :(得分:4)
我想,你需要background-position:
.startbutton {
background-position: center center;
background-image: url(Camera.png) !important;
}
答案 1 :(得分:1)
您是否有理由不使用标准物品:
icon: '',
iconAlign: 'center'