[英]Why is there no background image in IE7?
ie7中缺少背景图片; 只有ie7有问题。
该网站在这里http://www.competition4ct.com/ 。
这是我用于背景图像的调用:
html { background : ("source-file.png");}
为什么没有出现背景图片?
您似乎缺少文件名前面的url
。 它应该是:
body {background-image: url(source-file.png);}
请注意,我在这里也使用了background-image
,而不是background
。 您可以使用background
快捷方式,然后它看起来像这样:
body {background: transparent url(source-file.png) left top no-repeat;}
在body
标签上放置背景也更常见,尽管我确信html
标签在大多数情况下也可以使用。
不确定这是否会导致问题,但您需要将“url”放在括号前。 也可以不伤害使身体有背景。 最后,只是 'background' 属性可能需要更多输入,因为您一次设置了几件事(并且您只是尝试制作 bg 图像)。 所以:
html { background-image : url("source-file.png"); }
或者
body { background-image : ("source-file.png");}
有关更多信息,请参阅:
http://www.w3schools.com/css/pr_background.asp
让我们知道这些解决方案是否能解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.