所以我有以下
.select,
.input,
.schedule,
.editableFields
{
cursor: pointer;
background-color: blue;
}
这会覆盖以下内容:
#past .layer.color {
background-color: #E5D403 !important; /*this needs to be the first priority color*/
}
编辑:如果我只有第二个 CSS,它确实有效!但是当我添加蓝色时,它会为它所需要的所有颜色着色并覆盖#past(我不希望它这样做!)但我需要第二个背景颜色来覆盖第一个背景颜色。我试过给它很多ID和很多类,还使用!important,但似乎没有任何效果......请帮忙!(我不知道这是否重要,但我也在使用 twitter bootstrap,但我的所有 css 规则都在 custom.css 中)
我还尝试在 html 中添加内联 css。有很多 html,所以我只放顶部
<div class="accordionGroups">
<div class="accordionHeading">
<a class="accordion collapsed" data-toggle="collapse"
data-parent="#mainAccordion" data-target="#collapseThree"> <i
class="twistyIcon"></i> Layers
</a>
</div>
<div id="collapseFirst" class="accordion-body collapse">
<div class="accordion-inner scrollable">
<ul id="layers-dropdown-menu">
<li><label class="checkbox" id="past"> <span class="layer color legend"></span> Past
</label></li>
作为背景颜色:#E5D403 但它给了我一个错误,我不知道为什么(也许我把它放在了 html 中的错误位置?)
以下也不起作用:
.checkbox span .layer.color.legend
{
background-color: #E5D403 !important;
}