我需要覆盖style.css中的头部样式。
这是我需要覆盖的样式。
.t_header{
text-align: center;
background-color: #bfd4f0;
color:#15428b;
white-space:nowrap ;
margin:0px 10px 0px 10px;
height:1.5em;
}
现在我创建了另一个名为black.css的css文件,我需要为.t_header
创建不同的背景颜色。
.t_header{
text-align: center;
background-color: white !important;
color:#15428b;
white-space:nowrap ;
margin:0px 10px 0px 10px;
height:1.5em;
}
我已经使用了!important
来覆盖style.css中的样式,但是它没有起作用,但出于某种原因,我使用!important覆盖的其他样式类和ID却很好地工作。我希望有人可以给我另一种覆盖样式的方法,而不是使用!important
。谢谢。