选定的单元格并显示文本的颜色部分 [英] selected cell and showing color part of text
问题描述
你好
我展示了两张图片.为什么这两个图不相等?首先,誓言是白色的,但是第二,誓言是红色的".
I show two picture. why these two picture are not equal? In the first, oath is white but in second, oath has "red a".
推荐答案
看来,为所有'a'上色的事件是在为'oath'上色的事件之后发生的'白色.
it seems that the event where you color all the 'a' is happening after the event where you color 'oath' white.
我建议您在2个CSS类中进行管理,第一个是白色,第二个是"a".
i would advice you to manage that in 2 CSS classes, 1st is color white, second for the 'a'.
现在您应该学习CSS优先级.
now you should learn CSS Priority.
第1条规则是第1条写的,因此
rule 1 is who was written 1st so here
身体{颜色为红色}
身体{color:green}
body {color:green}
颜色将为绿色
然后有一个更强大的选择器
and then there is stronger selector
所以,如果我有这个html
so if i have this html
< div class ="d"> hi&span class ="s"&man;/span></div<
<div class="d">hi<span class="s">man</span></div>
和这个CSS
.d .s {颜色:蓝色}
.d .s{color: blue}
.s {颜色:红色}
.s{color: red}
它将是蓝色的
所以用更强的选择器使白色
so make the white with a stronger selector
这篇关于选定的单元格并显示文本的颜色部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!