0

你知道我看不到标题的白色背景颜色吗?出于某种原因,我只能看到用作身体背景的背景图像。谢谢

body { 
overflow: hidden; 
background:url(../images/81107173.jpg) no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-ms-background-size: cover;
-o-background-size: cover;
background-size: cover;} 

#header {position:absolute; top:0px; left:0px; height:100px; overflow:hidden; background-color:#FFF; }

#container {position:absolute; top:100px; bottom:60px; left:0px; overflow:auto; background:#639;}

#footer {position:absolute; bottom:0px; height:60px; left:0px; overflow:hidden; background:#FC6;}
4

1 回答 1

0

你有overflow:hidden;并且没有定义宽度。我也没有看到您的任何 HTML,所以我不知道您是否在标题 div 中有内容。

为您的标题添加宽度,您至少应该看到白色背景。例如

#header {
   /* all your current css */
   width:100%;
}
于 2012-11-04T14:46:39.793 回答