简体   繁体   English

除一个属性外,所有在Sencha Touch 2中工作的CSS列表

[英]All CSS working in Sencha Touch 2 list except for one property

My list loads data, works fine and all CSS is being applied to each Cls except for the font color in the SelectedCls where I have the .ListSelected class. 我的列表加载数据,工作正常,并且所有CSS正在应用于每个Cls,除了SelectedCls中具有.ListSelected类的字体颜色之外。

The text should be white when selected state. 处于选中状态时,文本应为白色。

    .ListNormal {
        background: #f7f7f7;
        font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
        color: #024059 !important;
        text-shadow: 0px 0px 0px #000000;
    }

    .ListPressed {
        font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
        color: #024059 !important;
        font-weight: bold;
        text-shadow: 0px 0px 0px #000000;
        -webkit-box-shadow: inset 0px 1px 0px #ffffff;
        background: #b6e1ff;
    }

    .ListSelected {
        font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
        color: #ffffff !important;
        font-weight: bold;
        background-image: -webkit-gradient(linear, left top, left bottom, from(#1ca1ff), to(#0081dc));
        -webkit-box-shadow: inset 0px 1px 0px #b1dfff;
    }

在此处输入图片说明

When you use !important, the first property takes precedence over other properties with !important farther down in the sheet. 当您使用!important时,第一个属性的优先级高于其他属性,而!important则位于工作表的最下方。 The opposite is the case on properties where !important is not used (last takes precedence). 相反,在不使用!important(最后优先)的属性中,情况恰恰相反。 One of your other classes is taking precedence over your selected class. 您的其他课程之一要优先于您选择的课程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM