背景图片不显示

时间:2011-12-15 16:30:59

标签: javascript html css

我有一个奇怪的问题。我在开始在网站上工作之前测试的东西,所以我在制作不同的页面,里面有不同的图像。

我正在处理我在photoshop(背景图片)中所做的图像,由于某种原因,它不会在Chrome,FireFox或IE9的页面上显示。

以下是css中的简单代码:

body 
{
   width:auto;
   height:1000px;
   background:red images\BackGroundBig.jpg repeat-y fixed top ;         
}

这有什么问题吗?

当我将其更改为background-color:red时,它显示为红色背景。

2 个答案:

答案 0 :(得分:5)

语法错误:

background:red url("images/BackGroundBig.jpg") repeat-y fixed top ;

答案 1 :(得分:1)

另外你可以像这些一样得到它

用于背景效果的CSS属性:

background-color
background-image
background-repeat
background-attachment
background-position

完全

background:Color url("path") repeat x y;
相关问题