Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 我的css背景色没有改变,为什么?_Html_Css - Fatal编程技术网

Html 我的css背景色没有改变,为什么?

Html 我的css背景色没有改变,为什么?,html,css,Html,Css,我使用glitch.com,背景色不会因为某种原因而改变,我在其他项目中使用了相同的代码,并且效果良好 css: 如果您真的想在没有找到背景色的情况下尝试覆盖它,您可能会在其他地方设置背景色,使其成为!重要信息像这样 body { font-family: helvetica, arial, sans-serif; margin: 0 auto; background-color:rgb(40, 48, 54) !important; } h1 { font-style: i

我使用glitch.com,背景色不会因为某种原因而改变,我在其他项目中使用了相同的代码,并且效果良好

css:


如果您真的想在没有找到背景色的情况下尝试覆盖它,您可能会在其他地方设置背景色,使其成为
!重要信息
像这样

 body {
  font-family: helvetica, arial, sans-serif;
  margin: 0 auto;
  background-color:rgb(40, 48, 54) !important;
}

h1 {
  font-style: italic;
  color: #373fff;
如果您在,则必须使用此代码
.cHtQlM{
背景色:红色;

}

这似乎有效。你能告诉我们更多的细节吗?否则,我认为您在其他地方更改了
背景色
。可能有很多原因,其中一些原因是您正在查看错误的页面或在错误的css文件中设置背景;或者你的css被浏览器缓存;请提供更多的上下文Hi John,可能是“!重要提示“(请注意,我使用的是#而不是RGB)并且尝试使用RGBA不应该在那里,在“h1”的末尾需要有一个RBRACE“}”,并尝试使用“background”而不是“background color”,这些只是一些建议,@RingGames公司是的,它可以100%声明为
背景
,而不是
背景色
,因此我建议OP同时尝试这两种颜色。谢谢你的意见,没问题。没问题,我是说“十六进制”
 body {
  font-family: helvetica, arial, sans-serif;
  margin: 0 auto;
  background-color:rgb(40, 48, 54) !important;
}

h1 {
  font-style: italic;
  color: #373fff;