按钮在sencha的背景颜色 [英] Button background color in sencha

查看:74
本文介绍了按钮在sencha的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的sencha touch。
我们如何将按钮的背景颜色更改为白色?我有一个按钮在每个角落有两个图像。我想要的按钮是纯白色的。
我试过使用css像这样:

I am new to sencha touch. How do we change the background color of a button to white? I have a button with two images in each corner. I want the button to be plain white. I tried using css like this:

.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中的灰色默认按钮颜色),中间有白色。如何让它完全白色?请帮助。

My button has grey borders (Grey default button color in sencha) with white color in mid. How do i make it completely white? Please help.

我甚至尝试过:

style: "background-color: white" 


推荐答案

解决了我的问题。

               {

                   xtype: 'button',
                   cls: 'btn',
                   text: '<div class="person">People</div>',
                   labelWidth: '100%',


                },



在我的app.css中定义

In my app.css define

.btn
{
background-color: white !important;
background-image: none;
}



我们必须重新定义背景颜色和背景图像属性,默认sencha-touch.css属性被覆盖。谢谢Thiem Nguyen的帮助。

We have to redefine both background-color and background-image properties so that the default sencha-touch.css properties are overridden. Thank you Thiem Nguyen for your help.

这篇关于按钮在sencha的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆