Extjs Sencha touch-无法将按钮上的图像样式设置为更小
我有以下物品在一个容器内。我的问题是xtype按钮,特别是“text”属性。php代码工作正常,跨度也使字体变红,但我无法将图像的样式设置为22×22像素。即使我上传22×22像素的图像,最终还是放大到38x38。其他地方的样式规则可能存在干扰,是否有方法通过在text属性中键入适当的文本来覆盖它?谢谢Extjs Sencha touch-无法将按钮上的图像样式设置为更小,extjs,sencha-touch,Extjs,Sencha Touch,我有以下物品在一个容器内。我的问题是xtype按钮,特别是“text”属性。php代码工作正常,跨度也使字体变红,但我无法将图像的样式设置为22×22像素。即使我上传22×22像素的图像,最终还是放大到38x38。其他地方的样式规则可能存在干扰,是否有方法通过在text属性中键入适当的文本来覆盖它?谢谢 { xtype:"form", baseCls:"", cls:"search1-container dotted-lin
{
xtype:"form",
baseCls:"",
cls:"search1-container dotted-line",
url:"search",
standardSubmit:true,
layout:"hbox",
items:[myapp.textBoxes.freeSearch,{
xtype:"button",
text:"<img src='images/Search.png' style='float:left; height:22; width:22;' />Pre-owned <span style='color:red; font-size: 11px; display:inline-block; vertical-align: top;'> [<?php echo $rows; ?> Cars]</span>",
cls:"search1-submit"
}],
listeners:{
}
}
{
xtype:“表单”,
baseCls:“”,
cls:“搜索1集装箱虚线”,
网址:“搜索”,
标准提交:对,
布局:“hbox”,
项目:[myapp.textboxs.freeSearch{
xtype:“按钮”,
文字:“二手车”,
cls:“搜索1提交”
}],
听众:{
}
}
试试这个:
风格
<style>
.icon {
background-image: url('images/Search.png');
}
</style>
Ext.create('Ext.panel.Panel',{
xtype:"form",
baseCls:"",
cls:"search1-container dotted-line",
url:"search",
standardSubmit:true,
layout:"hbox",
items:[{
xtype:"button",
height: 32, // you can change this parameter too
text:"Pre-owned <span style='color:red; font-size: 11px; display:inline-block; vertical-align: top;'> [Cars]</span>",
iconCls : "icon",
cls:"search1-submit"
}],
renderTo:Ext.getBody()
.图标{
背景图片:url('images/Search.png');
}
代码
<style>
.icon {
background-image: url('images/Search.png');
}
</style>
Ext.create('Ext.panel.Panel',{
xtype:"form",
baseCls:"",
cls:"search1-container dotted-line",
url:"search",
standardSubmit:true,
layout:"hbox",
items:[{
xtype:"button",
height: 32, // you can change this parameter too
text:"Pre-owned <span style='color:red; font-size: 11px; display:inline-block; vertical-align: top;'> [Cars]</span>",
iconCls : "icon",
cls:"search1-submit"
}],
renderTo:Ext.getBody()
Ext.create('Ext.panel.panel'{
xtype:“表单”,
baseCls:“”,
cls:“搜索1集装箱虚线”,
网址:“搜索”,
标准提交:对,
布局:“hbox”,
项目:[{
xtype:“按钮”,
高度:32,//您也可以更改此参数
文字:“二手车”,
图标:“图标”,
cls:“搜索1提交”
}],
renderTo:Ext.getBody()
})) 他问的是如何更改按钮图标的大小,而不是如何更改按钮本身的大小