我是 sencha touch 的新手。
我们如何将按钮的背景颜色更改为白色?我有一个按钮,每个角都有两个图像。我希望按钮是纯白色的。
我尝试使用这样的CSS:
.quest {
background: url(../images/quest.jpg) no-repeat left,
url(../images/rightarrow.jpg) no-repeat right;
background-color: white;
border: none;
border-color:white;
padding-left: 50px;
text-align: left;
}
我的按钮在这里:
{
xtype: 'button',
text: '<div class="quest">Info</div>',
labelWidth: '100%',
name: '',
handler: function() {
}
}
我的按钮有灰色边框(sencha 中的灰色默认按钮颜色),中间有白色。怎样才能让它完全变白呢?请帮忙。
我什至尝试过:
style: "background-color: white"
使用“cls”属性解决了我的问题。
{
xtype: 'button',
cls: 'btn',
text: '<div class="person">People</div>',
labelWidth: '100%',
},
在我的 app.css 中定义
.btn
{
background-color: white !important;
background-image: none;
}
我们必须重新定义background-color和background-image属性,以便覆盖默认的sencha-touch.css属性。谢谢蒂姆·阮的帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)