你要是调试下看下Ext的button是什么样,大概就知道怎么改了
Ext原来的样式不也挺好看的么
Ext.onReady(function () {
Ext.create('Ext.Button', {
text: 'Click me',
id:'mine',
renderTo: Ext.getBody(),
handler: function() {
alert('You clicked the button!');
}
});
Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {
alert('You clicked the button!');
}
});
//背景色方式1,使用渐变色
Ext.getCmp('mine').el.setStyle('background-image','-webkit-linear-gradient(top,red,yellow 40%,yellow 30%,red)');
//背景色方式2
//Ext.getCmp('mine').btnEl.setStyle('background-color',"yellow");
//字体颜色
Ext.getCmp('mine').btnInnerEl.setStyle('color',"green");
})