我正在对您的标记做出一些假设(因为您没有提供任何标记),但我认为可以肯定地说这是您的问题。
假设你的标记是这样的......
<div class="peace-keepers-edition">
<div id="playview">
<button class="x-button-back">
<i class="x-button-icon">icon</i>
</button>
</div>
</div>
您的第一个选择器以按钮元素为目标...
.peace-keepers-edition #playview .x-button-back {
color: #FFF !important;
}
但是您的第二个选择器针对的元素是您的按钮的后代...
.peace-keepers-edition #playview .x-button-back .x-button-icon {
color: #ccccff;
}
您的!important
规则无关紧要,因为您的选择器针对不同的元素。
易于修复;一行一行地添加这一行769
...
.peace-keepers-edition #playview .x-button-back .x-button-icon {
color: #fff;
}
破例...
body {
background: #1a1a1a;
}
button {
padding: 15px;
font-size: 30px;
background: green;
}
.peace-keepers-edition #playview .x-button-back {
color: #FFF !important;
}
.peace-keepers-edition #playview .x-button-back .x-button-icon {
color: #ccccff;
}
<div class="peace-keepers-edition">
<div id="playview">
<button class="x-button-back">
<i class="x-button-icon">icon</i>
</button>
</div>
</div>
工作示例...
body {
background: #1a1a1a;
}
button {
padding: 15px;
font-size: 30px;
background: green;
}
.peace-keepers-edition #playview .x-button-back {
color: #FFF !important;
}
.peace-keepers-edition #playview .x-button-back .x-button-icon {
color: #fff;
}
<div class="peace-keepers-edition">
<div id="playview">
<button class="x-button-back">
<i class="x-button-icon">icon</i>
</button>
</div>
</div>