标头中定义的背景图像命令不起作用

时间:2013-01-16 13:19:08

标签: css

我一直在摸不着为什么背景图片功能对我不起作用。有什么建议?是的我已经知道我是一个有严重注意力问题的笨蛋..

<head> 
<style type="text/css"> 


<!-- As you can see below, i tried to include a header image in 3 different ways -->

header {height:200px; background-url:(http://i.imgur.com/HtAvI.jpg) ; }
#header-wrapper { width:660px; margin:0 auto 10px; border:1px solid $bordercolor; background:url(http://i.imgur.com/HtAvI.jpg) no-repeat; height:400px; }
#header{background image: url(http://i.imgur.com/HtAvI.jpg);}

<!-- i tried including it in the body as well, to no avail -->
body { background image: url(http://i.imgur.com/HtAvI.jpg) ; }
p {color: red}

</style>
</head>
<body>

<p>this is text</p>

</body>"

2 个答案:

答案 0 :(得分:2)

background image:更改为background-image:。此外,没有background-url

等属性

答案 1 :(得分:0)

没有background-url。没有background<space>image。有background-imagebackground

解决这些问题后,图像应正确显示。