Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.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文件中将网页背景颜色设置为黑色(#000000)时,它在web浏览器上显示为白色,这是为什么?_Html_Css_Colors_Hex - Fatal编程技术网

Html 当我在CSS文件中将网页背景颜色设置为黑色(#000000)时,它在web浏览器上显示为白色,这是为什么?

Html 当我在CSS文件中将网页背景颜色设置为黑色(#000000)时,它在web浏览器上显示为白色,这是为什么?,html,css,colors,hex,Html,Css,Colors,Hex,当我在CSS代码中将背景色设置为黑色时,为什么我的背景在浏览器中显示为白色?能否尝试在“背景色”属性的末尾添加分号 body { background-color: #000000 text-align:center; } #main { width: 1000; height: 600px; background-color: #f1c83e; } background-color: #000000; 能否尝试在“背景色”属性的末尾添加分号 body { backg

当我在CSS代码中将背景色设置为黑色时,为什么我的背景在浏览器中显示为白色?

能否尝试在“背景色”属性的末尾添加分号

body {
background-color: #000000
text-align:center;
}
#main {
    width: 1000;
    height: 600px;
    background-color: #f1c83e;
}
background-color: #000000;

能否尝试在“背景色”属性的末尾添加分号

body {
background-color: #000000
text-align:center;
}
#main {
    width: 1000;
    height: 600px;
    background-color: #f1c83e;
}
background-color: #000000;

如果在
背景色:#000000
的末尾添加分号,使其为
背景色:#000000,您的代码将正常工作

以下是您的代码:

正文{
背景色:#000000;
文本对齐:居中;
}
#主要{
宽度:1000;
高度:600px;
背景色:#f1c83e;
}

你好

如果在
背景色:#000000
的末尾添加分号,使其成为
背景色:#000000,您的代码将正常工作

以下是您的代码:

正文{
背景色:#000000;
文本对齐:居中;
}
#主要{
宽度:1000;
高度:600px;
背景色:#f1c83e;
}

你好

您忘记将;在队伍的最后


你忘了把钥匙放好;在队伍的最后