我一直在摸不着为什么背景图片功能对我不起作用。有什么建议?是的我已经知道我是一个有严重注意力问题的笨蛋..
<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>"
答案 0 :(得分:2)
将background image:
更改为background-image:
。此外,没有background-url
答案 1 :(得分:0)
没有background-url
。没有background<space>image
。有background-image
,background
。
解决这些问题后,图像应正确显示。