Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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
CSS分析错误,未显示div背景色_Css_Background Color - Fatal编程技术网

CSS分析错误,未显示div背景色

CSS分析错误,未显示div背景色,css,background-color,Css,Background Color,我的div背景色没有显示在chrome中,我在w3css验证程序中遇到了这个错误: 16 .myfiles Value Error : background-color Parse Error background-color= #e9e9e9 这是div实现: <div class="myfiles"> <table class="center"> <h2>My Files</h2> <?php $dir = "./

我的div背景色没有显示在chrome中,我在w3css验证程序中遇到了这个错误:

16  .myfiles    Value Error : background-color Parse Error background-color= #e9e9e9
这是div实现:

<div  class="myfiles">
<table  class="center"> 
<h2>My Files</h2>
<?php 
$dir    = "./userFiles/".$login;
$files = array_diff(scandir($dir), array('..', '.')); 
foreach($files as $ind_file){ 
?> 
<tr><td><a href="<?php echo $dir."/".$ind_file;?>"><?php echo $ind_file;?></td></tr>
<?php 
} 
?> 
</table> 
</div>
所以问题是my.myfiles类中的背景色不起作用。 我试图通过指定div的高度来修复它,但没有成功。


请帮助我。

背景色=
更改为
背景色:
您编写的
背景色=\e9e9e9,应为
背景色:#e9e9e9

您必须将myfiles类中的“=”更改为“:”

@zeee9你并不愚蠢。这发生在我们最好的人身上。
body {
    margin-top: 0px;
    width: 100%;
    height: 100%;
    background-image: url("bg.jpg");
    font-family: Arial, Helvetica, sans-serif;
    font-size : 14px;
}
h2{
    text-align: center;
    color:#C64934;
    margin-bottom:5px;
}
.myfiles{
 height: 50%;
 background-color= #e9e9e9;
}
.center {
    margin-left: auto;
    margin-right: auto;
}
#save{
  background: #3498db;
  background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
  background-image: -moz-linear-gradient(top, #3498db, #2980b9);
  background-image: -ms-linear-gradient(top, #3498db, #2980b9);
  background-image: -o-linear-gradient(top, #3498db, #2980b9);
  background-image: linear-gradient(to bottom, #3498db, #2980b9);
  -webkit-border-radius: 4;
  -moz-border-radius: 4;
  font-family: Arial;
  color: #ffffff;
  font-size: 14px;
  padding: 6px 30px 6px 30px;
}
#save:hover{
  background: #3cb0fd;
  background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
  background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
  background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
  background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
  background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
}
#result {
    margin-left: 80px;
    border: 1px solid #cccccc;
    width: 270px;
    background: #E9ECEF;
    font-family: Arial, Helvetica, sans-serif;
    font-weight:bold;
    font-size : 12px;
    padding:5px;
    margin-bottom:10px;
}
.text {
    border: 1px solid #cccccc;
}
input::-webkit-input-placeholder{
    color:grey;
}
.values{
  font-family: verdana;
  font-weight:normal;
  font-size : 10px;
}
.key{
  font-family: verdana;
  font-weight:bold;
  font-size : 12px;
  padding-bottom:15px;
}
#nav1 {
  margin-top: 0px;
  list-style-type: none;
  float: right;
  font-weight: bold;
}
#nav1 li{
  display: inline;
  padding-right: 20px;
  vertical-align: middle;
}
table {
display: table;
border-collapse: separate;
border-spacing: 10px;
}
a, a:visited, a:link {
color: #A21313;
text-decoration: none;
}